How to make an NPC move in a straight way instead of constantly going next to a wall

How do you make a Baldi NPC chase you/go to waypoints in a straight way instead of constantly going right next to walls in turns? I want to recreate the actual game of Baldi’s Basics NPC, but I have no idea how to do it, + it makes it look worse when the NPC goes right next to walls

What I want to achieve:

What my Baldi NPC is:

1 Like

Set the agent radius to near zero, and add pathfinding modifiers that make the hallways incredibly tight. Don’t add any colliders.

Where do I put the pathfinding modifiers on? Sorry, I’m kind of new to the pathfinding stuff.

You should look at the documentation (I’m on my phone rn, I’d find it otherwise), but basically you add a pathfinding modifier into invisible, anchored, uncollidable parts and you need to ensure it’s something the NPC avoids. In the data when computing, set the agent radius to be less than half the distance between the two of these parts.

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