AI Move To not walking straight to target

Hi all,
I have a blueprint AI actor that just walks between 2 actors, and I move him using the “AI MoveTo” node. However for some reason I just can’t get him to walk straight to the object despite there being zero obstacles or whatever. The target waypoints and the Enemy AI pawns are exactly on the same position on the axis, there should be no reason for it to deviate, yet it just slightly changes rotation. See the behavior in this video below:


I thought maybe it was a collision thing but it doesn’t seem to change when trying different things. Collision presets:

Maybe there’s I’m making a mistake when calling AI MoveTo?:

Or would it be more stable if I write everything in code? BP is slowly driving nuts.

Any help or suggestion is appreciated, greetings.

Try to set the Z value location of patrol point the same value as your character z value, to see if there any change.

I have set the same Z value, so now Z and Y are all the same, but unfortunately no change. Thanks for the suggestion tho.

try to set the rotation of your char just before the AiMoveTo so that it face the patrol point, using FindLookAt node.

image

1 Like

I have tried the node, the rotation is correctly locked but still it just moves in that weird line. Here is what I got:

Alse here the first time I attempted it(wrong) lol:

Thanks for the suggestions mate. Think I might try to redo the project in mostly code, hopefully I get less issues that way.

1 Like

AI controlled Character repeat waypoints Character he following. He will not go on short distance. If you wish he ignore waypoints, give him instruction :smile: . " AI Move To " very primitive instruction, often useless. use " Behavior Tree " and " BlackBoard " (from Behavior Tree). You can find on YouTube videos about how working Behavior Tree.

AI not so simple as it looks. :laughing: There is some tricks.


Yeah that pretty weird, it should have gone straight line without issue like this.

Try to add some print string to see if your AiMoveTo get recalled or something during the process.

Otherwise just make a new project and test on different object for the target.