Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

How to make multiple agents move to somewhere BY a point instead of fighting over the exact point?

Discussion in 'Navigation' started by Th0masThe0bvious, Nov 24, 2021.

  1. Th0masThe0bvious


    Aug 22, 2018
    This is a question pertinent to real-time-strategy games like Command & Conquer and Starcraft. Usually those games let you select multiple units and order them to move to a destination. It's pretty convenient to use Navmesh with raycast hits for most orders in this sort of game, but things get problematic when you sent multiple units to one point, because when such an order is given with a single, specific coordinate made every selected unit's destination, they all go and will always be attempting to shove each other out of the way.

    What I need to know, therefor, is how to translate a point into somewhere in the vicinity of the raycast hit whenever this might be a problem, which is essentially any time you've ordered more than one unit to a place.