How do I make an AI Character STOP when using a Simple Move To Location node?

Hi All,

So I’m making an AI Character move in my game by utilizing the “Simple Move to Location” node. When this AI character overlaps MY character, I want the AI character to STOP immediately (it won’t.) How can I achieve this?

Hey VagrantProfile,

So, Simple Move to Location is just that, it is the simplest form or movement from the character’s position to a point that you pass into the function.

What you’ll want to use if you want more complex behavior such as stopping on overlap is Move To Location or Actor. This requires a reference to your AI Character’s AI Controller, and a Vector location or Actor reference for the controlled pawn to move to. In it, you’ll notice a Stop on Overlap option, which you can attempt to utilize for your current setup. You can also adjust the acceptance radius to allow your pawn to stop a certain distance away from its destination if you’d like.

Give this a try and let me know how that works.

Hi Sean,

Very much appreciate your response here! I have found that “Move To Location or Actor” node and see the “Stop on Overlap” option you’re talking about. What I’m actually aiming to do is stop my AI character’s navigation if they happen to overlap my controlled character before they reach their goal (like how a ghost in Pac-Man navigates around until they intersect Pac-Man…at which point the ghost stops.)

Is there a way to stop my AI’s navigation before they reach their goal?

I’ve created a simple setup that showcases how to stop your navigation before your AI Character reaches it’s goal. In my case, this is in the ThirdPersonCharacter2 blueprint (which is my AI class that I duplicated from ThirdPersonCharacter).

Using this setup allowed me to stop my AI’s movement when it collided with the player character (I used Hit because with the character’s default collision capsule, Overlap events often do not fire between two characters, at least in my experience).

Let me know if that works.

No problem, glad it worked for you.

Have a great day

Sean! Thank you so much. I am now able to get my AI Character to stop. Seeing how you achieved this with your attached screenshot was MOST helpful. I didn’t know about the “Stop Movement Immediately” node.

You are a gentleman and a scholar, good sir. Very much appreciate your help!