Behaviour Tree stuck in "Move To" in sequence

Hello,

I have been following tutorial series, but got stuck on video: - YouTube

I have had happen before as well when not using tutorial, but essentially the Move To node of a behaviour tree NEVER EXITS. It gets stuck.

Here’s is my problem shown in video:

I am debug drawing a sphere equal to the size I am checking.

Any help would be appreciated!

I’m having a problem with , too.
I’m running v. 4.10.1 and I’d like to think there’s a problem with Move To function, too. (Though I’ve double, triple-checked, I may be doing something wrong.)

The author of the tutorial, Asher, was running version 4.8 or earlier it looks like. 3 or 4 other people are/were running into same problem. One user got around the problem by force creating and deleting his own actor in lieu of using the Target Point.

The only notable difference between the tutorial and my project is that I had to use Get Random Point in Navigable Radius because Get Random Point didn’t exist. I uploaded my AI data files and character meshes if anyone’s interested in finding the culprit.

Hey Squallfish, I just found something that seems related.

Therein MieszkoZ talks about usage tips for MoveTo. Seeing that, I ended up creating my own BT tasks (based on WanderToPoint) for the MoveTos in the search and combat states. I’m now getting better results than I got using the code MoveTo by itself. It’s still buggy and it’s tedious to set up.

Over half a year ago MieszkoZ said he filed for a feature to abort a move to via BP. He also listed a couple other workarounds.

Hi just had a similar issue having ported a solution up from 4.8 MoveTo was never completing.

It looks like it is never getting the notification message for the MoveComplete.

Looking at the engine source there are two implementations of the MoveTo Logic, one uses an AITask to handle the completion and the other uses WaitForMessage. see:

\4.10\Engine\Source\Runtime\AIModule\Private\BehaviorTree\Tasks\BTTask_MoveTo.cpp

I found that for my code, the second approach never seemed to trigger, but the first approach works as advertised. It’s controlled by a flag in:

Project Settings > AI System > EnableBTAITasks

The comment indicates is a transitional flag, the AITask mechanic is the ‘new’ way and will become the default.

Hope helps!

More documentation around stuff would be nice, but I guess it’s a work in progress!

Thanks so much! That did it.

Thanks for looking into so deeply :smiley: I appreciate it.

totally helps. Thanks a lot, wuzzy.
Just a note: I had to revert all my custom BT move to tasks (that were doing finish execute on move complete). They never worked well anyway…

Having checked EnableBTAITasks the basic MoveTo task completes properly.

I hope you don’t mind I shared information on the pertinent youtube tutorial here: - YouTube

AHHH! Thank you so much for . Checking EnableBTAITasks fixed it for me. I overloaded OnMoveComplete to add in some debug feedback, and was seeing that it completed but my BT would just sit on any MoveTo I had.

Thanks again!

Hmm I am going through the same tutorial and checking EnableBTAITasks didnt make my Move To Tasks complete :frowning: I can add a Force Success decorator but thats a hack.

I am on UE4.12.

Is solution working for anyone else?

Also still experiencing bug in 4.12. It’s a bummer of a bug because it’s not very obvious what’s causing it! Thank jeebus I found thread. :frowning:

Since I have encountered the same problem and the solution by force sucsess is not exactly what I wanted to have, I debugged a bit further and ended up coming to the solution that when the checkbox “Track Moving Goal” is unchecked the problem no longer occurs. I guess it has something to do with re-setting the location of the actor, but that’s just speculation. All in all uncheck “Track Moving Goal” and it works at least for me again as it should.

1 Like

Hey wuzzy, thanks for pointing out.

It worked for half of my Move To tasks… The thing is, my newly created Move To task no longer stuck with option checked, means they are using the first implementation as you suggested? But my old Move To task which I created at 4.9 version time will go into stuck status after I checked option, and will not happen if I leave it unchecked. means the old ones are using the second implementation(WaitForMessage)?

I am so confused, if you have any idea please let me know thank you so much!

solved it for me:

Project Settings > AI System > EnableBTAITasks

not helping if problem comes with a moveto based on location

I Have encountered similar problem, As you mentioned unchecking the “Track Moving Goal” has worked for me too but i need that option as in my case the goal is keep changing.

The solution what worked for me is to make the Z value less than 100 as mentioned in post:

1 Like

Thanks wuzzy . I’m so frustrated for 2 days until i find this post . Totally a live saver