Inheritance in Blueprints or Child Blueprints classes, Moving Together in the Unreal Engine 5 runtime

This video is attached a little to the previous one in which I showed you the difference between using the mesh here directly the platform mesh is the one we have here that can be anything in my case it is a square a squashed cube and using the root here that all depends on what you want to do use one or the other then I showed you here a little bit what happens if I put the Root here directly that goes to the world that is to say in this case how would the world positions be if I use the root it would be position 00 of the world since the relative would be 00 of the world while the relative of the mesh as it is inside the rot here would be 00 and it would behave like we expect that going from here from point A to point B that was explained to you in the previous video So the topic that I want to cover here is all Perfect there what we learned is that we could use either the root or the mesh depending on our needs and here I want to show you a little bit This then in this case Im going to grab this cube here that I have defined here Im going to place it up here and what do you think it goes to to happen well obviously nothing because they are independent objects if I run the application here you can see that it remains here as if nothing has already happened so this is where they enter I am going to select here again Well I am going to open here I have the cube which would be this one and here I have the the well the platform I dont know where it is here in the outliner it would be this one and my cube would be this one here are these two so here we can place a child component in in this case we would be interested in this cube the green one to place it here inside and with that we would have a child component therefore this being the parent the platform and the child being what is the exploded why could this work you could ask yourself in principle what we would like here is that when the platform moves the cube also moves So lets see what happens you will see that it does not work as is you can see the cube is still here and why is this happening it is again the importance of understanding how this works

The problem is that it is moving which is the mesh while we attach this as a child of the cube as a child of what would be the one called the one called here rot the one called here Root that is to say the root therefore not well this would be the object but it is the same therefore it does not work I go again here we are adding this cube it is like a child of the Root but not of the month which is the one we are moving over here Note that if we change here I go here to save I go to compile here s it would work Sure but we are going to have the problem that we had initially where notice that now if they are glued the component goes here to the root that is to say to 00 but of the world because we are working directly it is with the root then here you can understand a little bit of all this what is it that we could do here change the implementation here we could obtain the position of here location location I think it would be this get location from there things would get quite complicated our node and in the end it doesnt work as expected there I dont know very well Why I havent finished finishing that but no it doesnt work exactly with the measurements that Im placing here Always Even if I place the 3D widget here where it is placed it always goes a little before or after that is to say it moves either up to here or up to here I dont know why it has to do with it is also an issue with the scaling when I scale it it behaves differently but thats another issue The important thing is to understand here how all this works and what is happening And in this case what I did was vary the implementation a little bit by searching here a little bit on YouTube I found a video in English that also showed me another way of doing this process practically automated just as we have a way of applying the rotations directly on the platform that this also I already showed you in another video how to make a platform that rotates on its axis which is here placing the rotation component here is rotation moving rotation mov also here We have one for the movement that is called intercept to move intersect to move here you can add it eh interset of this you can I explain in another video I also leave it there attached but what interests us here is at least for now to understand How to expand all this So here Well I show you exactly what I did here Here you simply would have to add it in this case I went here directly to the construction Script and added the following logic I explain this to you in another video as I tell you so as not to lengthen this too much but I am going to expand this component that has the movement if it has the behavior that we want I will look for it here Here it is here I have it Notice that here I also have the 3D widget I move it here and it will behave practically ethically the same there you can see that it works the same way there The only problem I have is that for example for this widget I set a duration of whether it stays here at point A or at point B but here I couldnt define it suddenly there is but I was the one who couldnt see it but well at least it makes the movement that is expected which is to go from point A to point B So lets try here to place this object just as we did here as a direct child of this other one I look for the outliner here Here I have the platform and the cube I dont know where the hell it is Ah I clone it Here Im going to place it here as a child of this other component here you can see this would be the platform and this would be the other it doesnt matter if they are glued or not the important thing is that they are children and here we are going to start and you will see that in this case it does work as you can see and here again is the importance of understanding how the nodes are formed here of children and parents in this case Note that the one from This is the intersection the one from intersection is at the same level as the default It is without root therefore that is the one that is moving and therefore as we are here adding this component well this box this other blueprint is like a direct child of difal it is in root therefore both are moving just as it happened here So that was basically what I wanted to explain to you

- Andrés Cruz

En español

Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.