'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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source