Behavior tree with AImoveTo keeps failing

Hi,

shortly: I have an AI movement behavior tree based on the QuickStart tutorial (https://docs.unrealengine.com/en-US/Engine/AI/BehaviorTrees/QuickStart), but I am encountering quite wierd error. The left branch of the tree runs as it is supposed to - AI follows the player while its in the sphere trace radius and stops while player run out of the radius. But then the AI should go to the last known position of the player and after that return to home location…

But it is not. AI just stands on the spot and do nothing. Looking on the behaviour tree shows that its stuck on the leftmost move node in the right branch (which should order AI to go to TargetLocation). Funny thing is that when I simply disconnect the left branch (the second selector) and keep only the right branch with sequence node, move nodes starts working as they are supposed to (note that I must also change the middle decorator from homeLocation to something else, but thats not the issue, because I tried to change it with both branches connected, yet it didnt work anyway) and the AI goes to the last known position of the player.

I am busting my head over this for like ten hours, went through forums with similiar issues, but nothing helped - I deleted and added new navmeshbounds volume, tried different navigation settings, checked all the BPs… One thing I am almost sure is that the AIMoveTo task in the my own Move BP (and probably in the default MoveTo node too, because it doesnt work either) is “aborting” for some reason. I also checked the coordinates that are passed to TargetLocation variable and they also seem valid.

Hereby I am attaching the behaviour tree and my Move node BP.

I hope someone will be able to help…

Ok, one more clue - I created a new level with just a default plane for walking and tried my AI here and it worked as its supposed to… but I cant get it work in my original lvl. A checked the navmesh settings in both levels and they are the same, so I have no idea, whats wrong. I even tried to create the same plane ground in my original level and spawn my player and AI there to check, if my walls or something arent blocking the AI, but it doesnt work neither. I am out of ideas now, pls help me Epic Kenobi, you are my only hope :confused:

I might be wrong here but shouldn’t you only Finish Execute if the Movement Result says you reached the destination?

Hi Erik,
well I thought that OnSucces output pin fires only when the actor reaches the destination? Anyway when I watch the paths the script goes, it never fires the OnSucces output pin so Finish Execute never fires neither. It always ends with “Fail” PrintString going from OnFail output.