Download

Vectors with "Show 3d Widget" aren't world location?

Hello everyone!

Well i was trying to create a path for my AI to follow it randomly. So i decided to create an array of vectors with the “Show 3D Widget” flag ON. I placed some 3dwidgets on the level. But then when i set the AI to go there, the position it goes its far from the position of the widget in the map…

So my setup is fairly simple. I just use the node AIMoveTo and in the destination pin i connected a “get” node from the vectors array, (the index to get is a random one) but then nothing goes as expected.
The AI moves but not even close to the points i specified.

is this a bug? or is there something i’m missing?

Thank you for your time!

I am assuming the vectors are in local space, and the AI needs world-space vectors. There are a set of blueprint nodes to convert between world-space and local-space vectors. Invert Transform Location is one, although I think it transforms a location from world space to local space. You will need a reference to the Transform of the actor storing the vectors plugged into the vector transform node for it to work.

oh i see and yh it’s probably that. I didn’t thought of the possibility of the vectors being in local instead of world space.
I’ll test it and let you know!
Thank you for your help!

You are quite welcome. Happy to help.

Yay! finally tested that today and it’s working correctly.
Thank you very much for your help :slight_smile: