Forum rules - please read before posting.

Unity Navigation only with Nav Mesh Agents?

Does Unity Navigation rely on Unity's Nav Mesh Agents and the Nav Mesh Agent Integration script or is it also possible for NPCs to navigate with their own walking/etc systems?

My NPC's walk straight into the water without the Nav Mesh Agent Integration script attached.

(I like the way it looks when NPC's walk/turn/etc relying on AC's system much better without Unity's own Nav Mesh Agent)

Comments

  • No, NavMeshAgents are not necessary for Unity Navigation - but to use NavMeshAgents, you must also have the NavMeshAgentIntegration attatched.

    A tutorial for Unity Navigation-based pathfinding can be found here.
  • Thanks! Got it working now. Wasn't sure if they were optional or if something else was the problem. (Something else was the problem, dumb me once again.). I'm amazed at how well this all works. NPC no longer drowns himself and crosses the bridge nicely.

    The "Keep out of player's way?" Doesn't seem to work though. Is that right? Putting a NavObstacle on the player also doesn't seem to help the NPC from bumping in to the player. (There is definately a hole in the navMesh though).
  • What's your "Min. distance to keep" value?

    When trying out the NavObstacle, is your NPC being controlled with the NavMeshAgent / NavMeshAgentIntegration components?

    Bear in mind that this option is for NPCs that are standing still - they'll move out of the way if the player gets to close.  It's not for NPCs that are moving.

    To get NPCs dynamically moving around the player, you need to set a non-zero "Pathfinding update time" value in the Settings Manager.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.