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

Question NavMeshAgent keep running when already arrived at destination, and what is the red cross?

Discussion in 'Navigation' started by NMotome, Nov 28, 2020.

  1. NMotome

    NMotome

    Joined:
    Feb 20, 2020
    Posts:
    7
    Hey everyone, need help!

    Almost all the NavMeshAgents in my scene seem never get their destination.
    They just keep displaying running animation at the point, instead of displaying idle or moving to next random destination..

    I had ask them to stop when the distance is under 1f (which is half body of themselves), but no use.

    And when I select a NavMeshAgent and click on the Navigation window, check the NavMeshAgent component in Gizmos, I can see a red cross linked to the destination

    For those who can navigate properly, the red cross is right up to the destination.
    While others are biased, and they just keep running at the destination point.
    I can drag them away, but they just run back and keep running after reaching there again.

    The NavMesh is pretty smooth, their NavMeshAgent volume is not big, too.

    I'm really confused and cannot find anything about the red cross, anyone can tell me its name or something about it? And most importantly, what should I do?
     

    Attached Files:

    • 12.png
      12.png
      File size:
      140.3 KB
      Views:
      324
    • 123.png
      123.png
      File size:
      126.8 KB
      Views:
      323
  2. NMotome

    NMotome

    Joined:
    Feb 20, 2020
    Posts:
    7
    I had solved the problem (just because of my carelessness), but still don't know anything about the red cross...
     
  3. NMotome

    NMotome

    Joined:
    Feb 20, 2020
    Posts:
    7
    fine... I think had found the answer

    The position of the red cross is the parameter in NavMeshAgent.SetDestination(), which can be anywhere you put it.
    The position of the red circle is the destination on NavMesh, which must be inside of the NavMesh.

    Hope this would help...
    Maybe someday.