Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Multi Agent Type not working?

Discussion in 'Navigation' started by sama-van, Jul 27, 2020.

  1. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,642
    Made one PC and one NPC AgentType from the Navigation tab but only the PC agentType is working.
    For everry the NPCs on SetDestination, it always callback the warning
    Code (CSharp):
    1. Failed to create agent because it is not close enough to the NavMesh
    And then the following error :
    Code (CSharp):
    1. "SetDestination" can only be called on an active agent that has been placed on a NavMesh.
    Now in runtime if I switch the NPCs agent type to PC it works a charm.
    Switch back to NPC, error again.

    Very well explaned here as well :
    - https://issuetracker.unity3d.com/is...n-error-failed-to-create-agent-in-the-console

    What I am trying to achieve is :
    - PC height : 0.4m
    - NPC height : 1.8m

    PC can go below every asset such as table.
    NPC cannot.

    Not sure that is the right way of doing it?
    Agent Type was looking good from the settings but doesn't work.
    Any tips or advise please?

    Agent_PC.JPG

    Agent_NPC.JPG
     
  2. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,642
unityunity