Download

Relative Location issue

Hi All

im having a strange issue i wonder if anyone can help. When i try to trace from a skeleton mesh in a blueprint the relative location seems to be showing me something different. Ive tried using get world location and that works in a sense of getting the traces in the correct place, but then the traces are not relative to the bp itself , which i need them to be.

8e47fd0ad0c31ec810e43f05c40f2c274a9a7690.png
8225cb377c3d1bd1e053f98532e728ba13630321.jpeg

thank you in advanced for any help

“but then the traces are not relative to the bp itself , which i need them to be.” what do you mean by that?

Hi thank you for replying.

The character needs to have the traces relative to its own x and y within the blueprint, and not using the worlds x and y.
This would allow me to drop the blueprint anywhere in the map no matter what direction and the my traces will be x and y of the blueprints.
I have the character moving to its blueprints x and y… but for some reason the traces wont do the same. i have to then use get world location to get the traces starting from the same location at the character, but then they trace out to the worlds X and Y not the blueprint Relative X and Y
hope i have explained it better :slight_smile:

But what has me confused is that get relative location from the mesh the bunny in pic. Then showing the traces in another position

It’s because draw debug use world location, so if u want it to follow your bunny you need to use the actor world location. So use the get actor world location node and add to it, and if you want relative location after that, you can subtract the world location.

Are you using any attach nodes? You might have a double transform issue.

It depends on your Character variable being the root component or not too, i just checked, if it’s the root component the relative location is in fact world location.

Yep my bunny mesh is not the root of the blueprint… Im using a scene base then the a camera and the bunny is sub of that

So is there any way of using a node that will substract world location to give what i need to match my relative location rotation

I suppose you could do exactly that: use a Get World Location node and subtract it from the Get Component World Location