Search Unity

Agent remaining and some issues. LateUpdate?

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

  1. MrPacoGP


    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.