AI Stops Chasing the Player at Some Point

Hey,

I am working on a game where an AI is chasing the Player and then suddenly it stop chasing him.

Here’s a screenshot of my behavior tree:

When the AI reaches for an obstacle, it poses for a few seconds (The duration of the pose is based on the time it takes for isTrapped to reset, not the actual wait duration).
Note that the AI is working fine, and does what it’s supposed to do. It chases the player, then pause on obstacles, then continue chasing the player after a certain duration). This issue that the AI get stuck in some places, or stop chasing the player for no reason.
The navigation mesh is covering the entire path, and I do have one proxy link that I use for a place where the AI must jump, and it’s also working.
I tried debugging the blueprint and also use the AI debug mode (that you launch using the “ ’ ” shortcut key), and the AI is in the MoveTo task, just not moving.
I suspect the issue is one of the following:

  • The AI size does not match the
    Navigation mesh agent size? Though
    reducing the capsule size of the AI
    for troubleshooting did not solve the
    issue.
  • Once the Player reaches a
    certain distance, the meshes are
    occluded, and the AI does not know
    where to navigate
  • The AI thinks it
    reached the player if the player is
    on a level over it

Here are some interesting places were the AI got stuck, though strangely enough when I started moving in place around him he move again. Don’t be fooled by the AI head direction, it just the mesh that keeps pointing at the player.

He also gets stuck here a lot:

I have no idea what is causing this, any suggestion?

Thank you :slight_smile:

Maybe you should scale down AI character capsule size .

Thank you!
(I tried reducing the width but not the height, the issue was the height)