QUICK DEV TIP #44 UE4 / UE5 - RELATIVE AND WORLD TRANSFORMS

Here is a tip that I don’t think I have ever heard anyone talk about before!

Did you know you can switch between relative and world when manipulating location, rotation, and scale?

If you would prefer to watch the video version, check it out here

I’m not talking about changing the transformation gizmo between world and local at the top of the viewport. Instead, I’m talking about relative and world transforms in the details panel of an asset, as you can see in the image below.

QDT44_Blog01.JPG
 

In my example, I have two objects and I attach the cylinder to the cube. After doing that when I move the cube the cylinder moves along with it.

QDT44_Blog02.gif
 

When I make this attachment, the transform values of the cylinder become relative to the cube. As you can see in the GIF below, this means that if I zero out the X location it aligns with the cube because it is in relative location to the cube instead of being in line with the world X location.

QDT44_Blog03.gif
 

If I want/need to move the cylinder to a very specific world location, this is where I will run into problems, because the values are relative it means I cannot insert world location values as you can see in the GIF below.

QDT44_Blog04.gif
 

This is where we can use our new relative/world switch. On the cylinder under the transforms section of the asset details panel, if you click the little down arrow next to location a small menu will appear.

QDT44_Blog05.JPG
 

If you select world from this list then you can then enter world location values into the X, Y, and Z location values and they will be considered as though they were world locations even though the asset is parented to another object.

 

There is a slight problem with this though. Although still attached if we move our cube now we can see that the cylinder doesn’t actually move along with it. To fix this once we are done with lining up the world position, we can then switch back the location to relative again. Then we can move the cube and cylinder around together again in tandom.

 

This works in exactly the same way in the Early Access version of Unreal Engine 5. There is the UI overhaul but everything is in the same position as previously.

To be honest, I haven’t really used this much but there have been a few times I needed it and it came in super handy and saved me a bunch of time and pain.

An example of where I used this myself was in a platformer game. I had an asset attached to another asset and it was moving along with it but I needed the attached asset to be world location aligned to zero in the X plane. So I did what we just talked about above to make sure it was correctly aligned while still able to move with the object it was attached to.


If you want more quick tips & tricks
FOLLOW ME ON TWITTER @cbGameDev