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

Nav Agent pauses at end of offmesh jump to repath

Discussion in 'Navigation' started by Matt-K, Dec 11, 2018.

  1. Matt-K

    Matt-K

    Joined:
    Sep 10, 2018
    Posts:
    79
    Hey there,

    The issue is my agent is taking forever to repath and lagging at the end of a jump transition between offmesh links.

    I'm following the Dead Earth course and the instructor is basically non-existent in terms of helping and the forums seem dead. His agent smoothly jumps and everything, I took his script and tried and mine does not work the same. So I started tweaking the jump curve and messing around with settings and nothing works.

    The only observation I've been able to make is while the agent is at the end of the jump across the offmesh links it lags there, while it's lagging there the agent is repathing. The gizmo for it's forward movement is a red arrow and then there's the agent's path which is shown. The agent's directional arrow turns to line up with the pathway to the next waypoint and the stuttering/lag time is exactly parallel to this repathing.

    I'm not entirely sure how to fix this? I was thinking maybe having the agent repath in mid jump? Or can I speed up it's repathing?

    Also on the jump down from a higher position, it seems the navmesh agent's mesh component touches the ground before the physical gameobject and so the physical body of the gameobject lags in mid air.
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    I have no clue about that course, so I'm grasping in the dark here, but are you certain there are no physics or collissions interfering with your agent? If you have any colliders and/or rigidbodies on your agent, please turn them off and see if that still results in the same problem.