Search Unity

  1. Unity 2020.2 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

multiple nav mesh agent types problems

Discussion in 'Navigation' started by Robster95, Nov 5, 2020.

  1. Robster95


    Jul 3, 2019
    I have a game where I'm making multiple nav mesh agent types.

    The first one is of a humanoid that cant walk through objects and the second Agent type that I created will be used for ghosts and phantoms I have around the map. the ghosts can fly through walls.

    When I created the humanoid one, it was working fine but very buggy and jittery with the repathing when the target was far away from the agent with the nav mesh attached to it.

    When I created the second agent type which is the ghosts and phantoms it greyed out the first one ("Humanoid") and even deleting the ghost agent type wont fix it or bring it back to normal.

    when I try to run the game neither of the agent types will move with the navmesh.SetDestination method and an error pops up on the console that reads ""SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)"

    Does anyone have any ideas on how to fix this or even a way to help make the setdestination and movement of gameobjects that have an agent attached to it less jittery and not have to constantly have a repath stutter?
    Thank you.