Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Agent remaining and some issues. LateUpdate?

Discussion in 'Navigation' started by IndieFist, Jun 30, 2019.

  1. IndieFist


    Jul 18, 2013
    Hello, i have some issues with my agent navigator.
    Sometimes my agent still stuck in same point, like he isn´t getting right values from agent.remainingdistance.
    I have read in this forum, that is recommended to check this in LateUpdate when you send a new target.position.
    I would like to find some recommendations on how to properly use the agent, because in some examples I see that everyone does calculations in the update. Others recommend using Vector2Distance(player.transform, agent.transform) others tell me to use this.transform instead of agent.transform... I'm a little lost.
    Best regards.