[Answered]Move to location not working properly


I’m using move to location on an ai since it’s aflying ai and pathfinding won’t work. It’s been working find for the last few days until today when I tried to make this function where the AI reposition itself at a z distance relative to the ground. The problem is even though the goal doesn’t seem to be reached (or within the acceptance radius) the move to location node return “Already at goal”.

As you can see on the picture I joined, I’m trying to change the z position of the actor (self in this case) to a new value so I’m keeping the x and y position. Even though the actor is not within the acceptance radius of the goal, it still acts as if it is.

Move to Location is an instruction issued to the AI controller to make it try to move to the location you specify. As far as it’s concerned, it’s already there, because it’s already where the nav mesh is.

You most likely want to use “SetWorldLocation” on the Pawn, which will “teleport” the pawn to the location you specify.

I thought about using that with an interp to fake a move to, but I didn’t think it was the best solution. It feels like putting a band-aid on top of the problem. If it fixes the problem though, I’ll do it :P.

Just tried it out with a Vinterp and it works fine. Thanks Teiwaz for the help :slight_smile: