AI follow my character

Hello, I have a code that makes an AI follow my character, but it keeps following even after I exit the pawn. I wanted it to stop following when I leave the area. Where could I be making a mistake?

Few things you could do, In your Ai move to the acceptance radius is set to 5.0 and the location is set to be the the “TopDownCharacter” , This essentially means that the Ai will never be able to reach the acceptance state due to collision around the characters. Try Increasing the radius to around 100.0f.

Edit: Also Depending on how your perception component is setup you could be calling this multiple times when the perception update gets called. Consider creating a system to manage that to avoid unwanted behaviors.

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