SetRelativeLocation not working correctly
I have a .cpp with fragment of possibly-not-working code in initializer of the class (which is APawn):
I need to simply move innerCircle and outerCircle (static meshes) to (0,0,0) relative to root (what is sphere component). But some magic happens and when I start game the pawn spawns and meshes is in center of the map, but the root is there where it spawned. Even if i move code with SetRelativeLocation to Tick function it will not work fine. Game will move meshes only when i click on object (and select it). Overwise AddRelativeRotation is working in Tick correctly in every frame. How does SetRelativeLocation work? What i missed?
Solved it (just set variable AttachParent):
But i still don't understand why component of this actor suddenly attaches itself to root when i clicking on them in editor?
Follow this question
Once you sign in you will be able to subscribe for any updates here