Search Unity

Surrounding player with navmeshagents moving to its transform.position causing problems.

Discussion in 'Navigation' started by akshays, Aug 15, 2016.

  1. akshays

    akshays

    Joined:
    Aug 14, 2016
    Posts:
    14
    I have a bunch of navmeshagents lots of them moving to the players position. They surround the player. Also there are colliders so they cannot overlap. The navmeshagents that are blocked by other navmeshagents surrounding the player continue to try to move towards the surrounded player even though there is no path. This causes a lot of problems. Can navmeshagents be made smart so if there is no path to the desintation which is player.tranform.position they stop moving towards it and when there is start moving towards it. What code needs to be written to make this happen.