I am making an AI-Character and using the “Move To”-Tasknode inside the behaviour tree. When the character reaches the location of the move to node, he stops shortly and the moves on to the next point. “Stop on overlap” and the tollerance threshold don’t seem to have any effect.
I wrote a custom task with the “AI Move To” node and the same result.
Only when I do the “AI Move to” inside the “Receive Tick”-Event of the Task it seems to work. But that can’t be it due to lack of efficiency.
The character is not supposed to stop (zero out velocity) after the “Move To”, right? This is a bug, isn’t it?
Unfortunately I couldn’t reproduce the issue in a clean project.
But I guess you were right with the pausing. I think the "move to"´- task did call “Finish execute” and jumped all back to the beginning of the tree, which caused the pause.
I did an overhaul of my tree with a “sub-sequence” that is looping when a pawn is sensed and recaptures a new destination every n-seconds(delay), thus following the player without a big pause. I think the performance is not as bad as executing the “destination recapture” inside the tick.
If you are using MoveTo Node, it will add velocity to your character component. Now when you reach waypoint, the velocity becomes 0 for 1 frame before it find the next waypoint and starts moving towards it. At this time, my speed value in the animation blueprint fell down to 0 and my character loaded the idle animation (if you are not using animation, you are still probably having something with the character movement component?)
Solution :
Create a custom task-> In this task, write logic to Traverse through all the waypoints in the blueprint using AI MovetoLocationOrActor inside the blueprint (you have all the options of MoveTo). Keep traversing until you reach the last way point. Once you reached the last waypoint → Finish execute.
Make sure it doesn’t finish execute until you reach the last waypoint (Do some recursion, much easier), by this way the velocity never becomes 0 as it will never “finish executing” the move to.
I’ve created a simplified version of this setup where I have an AI Character patrolling various points using the Move To node to move between them. I am not experiencing any pausing on my end.
Would you be able to create a simplified version of your setup that just uses the Move To node in order to see if you’re able to reproduce the issue? It would be great if you could get it to occur in a clean project and provide me with a set of repro steps that I can follow to see it on my end.
The only thing I could think of that would cause this is that the task is pausing before being called again, which I would imagine would occur if you are calling Finish Execute as it will stop the task, which will then need to be called again in order to start moving. But it’s possible I’m overlooking something in your setup that would prevent this.
Let me know what you think and if you are able to reproduce this with a clean setup.
I’ve created a simplified version of this setup where I have an AI Character patrolling various points using the Move To node to move between them. I am not experiencing any pausing on my end.
Would you be able to create a simplified version of your setup that just uses the Move To node in order to see if you’re able to reproduce the issue? It would be great if you could get it to occur in a clean project and provide me with a set of repro steps that I can follow to see it on my end.
The only thing I could think of that would cause this is that the task is pausing before being called again, which I would imagine would occur if you are calling Finish Execute as it will stop the task, which will then need to be called again in order to start moving. But it’s possible I’m overlooking something in your setup that would prevent this.
Let me know what you think and if you are able to reproduce this with a clean setup.
Though it is several years later, I have to ask.
In the third paragraph you’re describing the problem with the MoveTo Task, being that it finishes executing for a moment once the patrol point has been reached.
Yet you’re not experiencing the pausing. So what does your solution look like?
One solution is to uncheck “Requested Move Use Acceleration” on the Character Movement Component when navigating through waypoints. It does kill acceleration on all move commands so you’ll want to keep it checked when they are actually at a stop, but want to uncheck it until they’re told to actually stop. This solved it for me with most characters running down a set of waypoints along a spline. Before this, they always paused at each point and returned a 0 velocity upon completion of the move command.
Necroing because I haven’t seen the “easy” solution to this posted anywhere. Creating a custom Move To does indeed solve this problem, but for folks who want to use the out of the box Move to, you can just use a simple parallel to make the AI find the player and also move in parallel for any move task.
So after stuffing around with everything, the root cause (and people can confirm this) is that on the character blueprint class you have, go to character movement and under Nav Movement select “Use Acceleration for Paths”.