Search Unity

Destroying a NavMeshAgent

Discussion in 'Developer Preview Archive' started by spiralgear, Jan 27, 2012.

  1. spiralgear

    spiralgear

    Joined:
    Dec 13, 2007
    Posts:
    528
    I am just messing around with the Navigation demo folder, specifically the "cave" scene and am having some trouble.

    All I am trying to do is have a raycast destroy one of the soliders when it hits it, but doing so ruins all the rest of the soliders paths. I have tried calling reset path and setting a new destination for all of the soliders in the scene when one dies, but the remaining soliders still seem to get stuck waiting for the destroyed one to finish climbing a ladder or jump a ledge even though he doesn't exist anymore.

    How do I delete a NavMeshObject without breaking the others in the scene?
     
  2. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    Edit: I've reproduced and fixed the bug - expect the fix for this issue to arrive in a coming release soon.
    --
    That sounds like a bug - please submit a bug-report including a project/scene where it can be reproduced.
     
    Last edited: Jan 27, 2012
  3. spiralgear

    spiralgear

    Joined:
    Dec 13, 2007
    Posts:
    528
    Dang, that was quick. Thanks alot. If I may ask was it a problem with the NavMesh component itself? Or just the soliders agentLocomotion.js controller script?

    Also, I noticed that when paths are reset while a navAgent is on an offmeshlink like ladders they continue up the ladder (which is certainly desired behavior) but get confused once at the top, and futilely bump against it trying to get back down. Since that is somewhat related, will that be affected by the fix?