Search Unity

agent.isStopped does not stop immediately

Discussion in 'Navigation' started by sickb0y247, May 1, 2020.

  1. sickb0y247

    sickb0y247

    Joined:
    May 29, 2014
    Posts:
    54
    Hi all,

    I notice a bit of a drag when I use isStopped on the agent. I noticed this used to be handled by the Stop() method and putting true in the parameter would stop the agent immediately but this is now considered outdated and isStopped doesn't have this sort of option for it.

    Is there another way I should be doing this to stop the agent immediately? I'd prefer not to disable/enable the agent if possible as I'd like for it to keep it's destination data intact.
     
  2. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    AFAIK you can set the agent speed to 0, which will stop the agent immediately.