I’m very new to all this, but my question is as follows:
I have one AI that I want to follow the main character player throughout a level until they reach the end. There are often hallways and corners in this level and the AI is extremely close to the player to the point where the player often gets stuck and can’t turn around.
I need to have the AI maintain a shorter distance between itself and the player but not sure exactly how to do this. I thought Acceptance Radius would do this, but it doesn’t seem to do anything when I change the value. Either it simply will not follow at all or it will continue follow just as closely as it was before. There is no middle ground here.
Here is a picture of the blueprint for the Pawn Sensing for this AI character
I’ve never used that node. You could do better with an actual AI Behavior tree to get more control.
A solution that may not be the best if that radius doesn’t work would be to create a custom collision type in preferences. Call it "stop AI follow"or something. Put a collision sphere or box around the player at the distance you’d like the ai to stop at.
Put a sphere around the AI pawn as well make sure they can overlap each other and nothing else.
On component overlap, cast to overlapping pawn and stop its movement until its no longer overlapping.
I did not create any new blueprints or change anything in my blueprints. I simply added a sphere around the main character player and the AI respects the boundary of the sphere. So much so that the main player can actually “push” the AI out of the way while still seeming to keep realism so there is no getting stuck in corners anymore.