I have a blueprint set up like in the picture below …
… now, everything works but if i turn the blueprint a bit left or right it loses the 2 coordinates i gave it because those are in words space.
Is there a way around this that you know ? Thank you for your time !!
Set Relative Location / Set World Location / Set Actor Location are three separate nodes:
I believe relative is local, World is world and actor location is world. I may be wrong but play around and you should figure them out pretty quickly.
But I would need a “get relative” node, not a set one, this is the full set up I needed to fix:
I need a way to get the relative position of a component and then add to it
To Main Actor A add two empty Actors B and C in that positions. B-s position will be A-s local position + vector(38,60,12) and C-s Position will be A-s local position + vector(38,15,12). Actor has default function getActorLocation and this returns global position of Actor. So add 2 public functions to A.
- GetPositionOfB- this returns getActorlocation B
- GetPositionOfC- this returns getActorLocation C
Then you can simple use a “Get Relative Location” (Highlight the root object of this BP first) and you’ll be fine
I found this solution to move an actor locally, using vectors (fordward, up…)