MoveTo node in Behavior Tree doesn't succeed or fail, just immediately restarts the sequence node

When you shoot an enemy, the enemy is supposed to run straight at you. Except currently the behavior tree Sprint sequence just loops the first two nodes. Its almost as if the MoveTo node immediately fails, except the sequence node doesn’t stop, it just restarts. Because of this the enemy doesn’t move anywhere. Also, the MoveTo does not succeed because the Loop or anything after the MoveTo never gets played.

I can confirm that the behavior tree stays on the ‘Sprint’ sequence the entire time. Also the BTTask_GetLocationNearTarget does indeed set “TargetLocation” to the correct location.

Update: I found out that the Sprint sequence will work as soon as the Player moves. So if you stand motionless and shoot the Enemy, the Behavior tree will run this Sprint sequence, but it will only loop through the first two nodes and the enemy will not move. But while it’s stuck in its loop, if you move one step in any direction, the Behavior Tree will stop looping, the MoveTo node will run properly and the enemy will run straight at you, and afterwards the rest of the sequence will run correctly.
Does anyone have any idea what the player moving has to do with any of this?

The fix is in the Collisions tab unchecking “Can Ever Affect Navigation” for my character sprite. Wherever my character was left a hole in the navigation mesh.

I was also wrong about the MoveTo node NOT failing, that is exactly what it was doing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.