I have one actor that spawns other actor(s) as its child (body spawns hand for instance). Now I need to place that hand with relative location to body (which works), but when I am in blueprint of a hand, I cannot get relative location even though I can set it (and it works as it should/I expect it to). What am I doing wrong?
It just looks like there is no Get Relative Location node, but there is a Get Relative Transform, which has the information you need, you just need to break it down:
You could just create your own Get Relative Location Macro that outputs only the location to keep things tidy.
Thank you kindly, that is very helpful and I can’t believe that I’ve missed that.
Note that all the relative transforms and locations using default Unreal functions such as GetActorLocation
(when it is attached to another actor), RootComponent->RelativeLocation
and GetRelativeTransform
on the SceneComponent
are in local space of the parent component/actor.
It’s important to remember what you’re getting when you’re working with those relative transforms. I needed world relative location and the only way I found how to do it is to just write it myself: