Forum rules - please read before posting.

pathfinding and player collision

edited July 2021 in Technical Q&A

Hi Chris,

I'm trying to better understand pathfinding and am having a slight issue. I'm using point and click movement method with baked navmesh. Player can get stuck when colliding with doorway opening. I've tried adjusting navmesh agent radius, player's capsule collider radius, rigidbody drag settings. Also, tried replacing capsule collider and rigidbody with character controller. Nothing seems to adequately prevent this. If I approach the opening at near straight on angles, he'll walk through with no issue. Is there a best practice setting(s) to minimize/eliminate the potential of getting stuck? YouTube video provided. Thanks in advance!

Kind regards, Tom


  • I've made some progress... Not sure if I'm on the right track but basically, I further reduced player's capsule collider radius and modified/baked new NavMesh data (specifically agent radius and height), now his path finding is more accurate. Are you able to verify if that is the approach to take? Thanks.

  • When Unity bakes a NavMesh, it does so with a pre-set radius you can set in the Navigation window. This should typically match the radius of your actual character - the one on your NavMesh Agent component.

    If the baked radius is lower than that of the agent, you'd get the behaviour shown in the video - because the character assumes the doorway is wider than it really is.

    If you're now using the same values between both, it does sound like you're taking the right approach now.

  • Thank you Chris! Thank you also for your guidance when it extends beyond just AC.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.