Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Path below ramp, NavMeshAgent fails to climb

Discussion in 'Navigation' started by electro_unity, May 13, 2019.

  1. electro_unity

    electro_unity

    Joined:
    Nov 29, 2015
    Posts:
    64
    Hi, I've noticed that my agents have serious difficulties when climbing ramps. I printed the path they are following and I discovered that they follow a straight line from one point at the bottom of the ramp, to other one at the upper floor. I think that's the problem. I've attached an image showing it and another one showing the actual navmesh. Is there a workaround for solving it? Thanks.

    pathbelowramp.PNG

    meshbelowramp.PNG
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    Not sure if the problem is the NavMeshAgent here.
    Do your agents have Rigidbodies attached to them? If so, make sure they have IsKinematic turned on. Else the physics engine is still going to affect their positioning, which doesn't play nice with any other movement system.
     
    Karias361 and electro_unity like this.