Navmesh Agent Quality

Hi,

In a section of my game, I want enemies all with the same navmesh agent, to walk through one another for a short amount of time.

I know that by setting Obsticle Avoidance Quality to None, my enemies will walk through one another, but how do I then change it through code to begin to use Obsticle Avoidance?

This should hopefully solve your problem:

Obstacle avoidance off:

navAgent.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;

Obstacle avoidance on:

navAgent.obstacleAvoidanceType = ObstacleAvoidanceType.MedQualityObstacleAvoidance;
4 Likes

Thank you @DwinTeimlon , that has fixed my problem. :slight_smile: