NPC using pathfinding takes sharp turns and hits walls or ignores them, gets stuck sometimes

Hi,

I’m trying to make a very basic pathfinding NPC that goes to a random preset location. For some reason, the NPC takes sharp turns and sometimes just completely ignores them and gets stuck despite the agent radius being 2.

Here’s some examples:



image

Any suggestions on how to prevent this?

You could make waypoints at each turn for the npc to pathfinder too. I also think there are some good tutorials on how to make advanced NPCs that won’t hit the wall.

I’ve experimented with that idea before, but I was unable to get anything working.
Do you know a good tutorial that uses that same method of preferring preset corner waypoints rather than using the ones created by pathfinding?