Forum rules - please read before posting.

Unity Nav, Player collided with NPC

Hello!

I'm using Unity Nav with terraint to my 3D scene. It works well, the problem is when I asign NPC to follow Player the Player collided with NPC and don't dodges it. I try it with NavMeshAgentIntegration, without NavMeshAgentIntegration and with NavMeshObstacle on NPC but it doesn't work.
There is a way to make the Player dodge the NPC.

Thank you!

Comments

  • edited March 2017
    How are you navigating the scene, with Point And Click movement?

    As the fact that the NPC is moving complicates matters, I would first recommend getting the player to succesfully avoid a stationary one.  The scripts you've referred to should allow you to do that.

    Then try setting a non-zero Pathfinding update time in the Settings Manager.  That tells characters to recalculate their NavPaths every X seconds, which should account for obstacles.
  • Ok, I solved it NavMeshObstacle checking Carve and configure Time to Stationary to 0.1. Also I changed the minium distance to follow to stop before the NPC.

    Thanks Chris
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.