AI stuck at end of Move To Behavior Tree node

So, I’ve been working on making an AI that behaves a bit like a ghost, so I’d been making adjustments to the character navigation and collision settings to try and make that happen. Along the way, I noticed that at some point the Move To behavior stopped working as expected. Basically, it still successfully moves the AI character to the location specified, but after they reach their destination, they sit there for a few seconds before actually completing it. As far as I can tell, they just get stuck.

I changed the radius of acceptability and made a service to show me the distance between the AI character and their target, and print it. Also, the destination point is being drawn for debugging purposes.

Here’s a screenshot of what it looks like. The AI is far from the player so this part of the tree is active, and I apologize for it not being clearly viewable. Its root is floating underneath the mesh, to make the creature look like it’s hovering:

I’ve been poking around and can’t seem to get it back to the normal, expected functionality. Any ideas as to why this might be happening?

Edit: I’m using version 4.7.3 for this.

I have a similar (or the same?) issue on 4.8. Have you found any solution to this yet?

Unfortunately not. In my case, I was able to get around it with a design change for how the character should act. Now it uses frequent moveto without using navigation data. Our other characters that use navigation didn’t run into this problem, so I don’t know where the problem came from. Couldn’t find a way to debug into the MoveTo, either, unfortunately.

If you can get away with it, perhaps try to create a custom Move To node for that character, using the navigation functions provided. It’s not quite as convenient, and it doesn’t automatically block while navigation is happening, but it should (?) be usable as a workaround.

Hi, what do you mean by “… using the navigation functions provided”?

There are blueprint (and I presume C++) functions called “Move to Location” and “Move to Actor”. There’s some settings for exactly what the function does, and you can choose to have it either use navmesh data, or not.

Thanks for this! I had a really small character and changing it’s capsule component fixed all the problems with the MoveTo node. You should put your comment as an answer so that we can upvote it and people to find this solution more easily though. Thanks again.

I just experienced this issue, but I found out why it’s happening: I have custom collision nodes in my character, and the default node set to a small size. However, for some reason, the Move To function * only * seems to function when interacting with the original Character CapsuleComponent, ignoring any custom components I set up. My guess is that some setting in the original c++ Character class allows Move To to interact with it, and ignore my custom collision components.

When resizing the CapsuleComponent to usable size, Move To functions normally. We’ll have to do some digging to figure out what the difference is, and how we can apply that to custom collision components. But for now, just restore the original CapsuleComponent size, and everything SHOULD work…

1 Like

You saved me, thanks

1 Like