AI getting stuck on corners for destination parts it can see

  1. What do you want to achieve? Keep it simple and clear!

Prevent AI from getting stuck on corners for waypoints it can see

  1. What is the issue? Include screenshots / videos if possible!

The AI pathfinding creates waypoints correctly for the most part, except for waypoints that it can see for some reason. The screenshot below shows that it can safely navigate around the corner above, but when it can see the destination the pathfinding creates waypoints directly to it, meaning that it is not considering the agent radius and corner the NPC is stuck on in the middle.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried making the walls thicker, changing agent radius and height, as well as the waypoint spacing. Changing the HRP size also seems to not work. Agent parameters seem to have no effect on the result. Technically if I moved the waypoint over so that it is more perpendicular to the doorway it would work but I would like to find a fix that does not involve this for areas I may not be able to use that as a solution.

2 Likes

You need to set an AgentRadius, see the example here: Path | Documentation - Roblox Creator Hub

2 Likes

Thanks for your feedback, but my point in making this post is that Agent Radius is not being taken into account when the next waypoint is in it’s vision. The agent radius works at the corner above, but not the corner that the NPC gets stuck on.

3 Likes

you could use PathfindingModifier