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

pathPending is unreliable

Discussion in 'Navigation' started by BenSizerRovio, Nov 20, 2017.

  1. BenSizerRovio

    BenSizerRovio

    Joined:
    Sep 25, 2017
    Posts:
    12
    I have code that calls SetDestination, and that returns true - but the state of hasPath and pathPending is almost entirely random. Usually hasPath immediately becomes false and pathPending immediately becomes true. Sometimes they both immediately become true. Sometimes hasPath is true and pathPending is false. So I apparently have no effective way of knowing if the path I just requested is still being computed or not. I can remember the last path I requested and compare that to the current path destination, but every so often it will return a path where the destination is a couple of units out from what was requested, so it's impossible to rely upon that method.

    Does anyone know what the expected value of these properties are, and under what conditions are they usable?
     
  2. burkedrane

    burkedrane

    Joined:
    Jul 9, 2013
    Posts:
    8
    Ping. I am hitting situations where both are true as well when I call SetDestination.