Alexander Hristov
Alexander Hristov

Reputation: 311

How to make Unity NavMeshAgent path around the player

in my project there's a Unity Multipurpose Avatar Crowd that uses the NavMeshAgent component. However when in VR it will come very close to the player in a very intimidating way, it be best to avoid that. Been trying to get the to path around the player, but not quite sure how. Things tried so far:

  1. Putting a NavMeshAgent on the player - this makes them able to push the player if he's in their path
  2. NavMeshObstacle on the player - this makes the AI sink into the ground if the player approaches them

Thinking the best way to do is in a script, but not entirely sure how to just slightly go around the player keeping the current desired destination.

Upvotes: 0

Views: 976

Answers (0)

Related Questions