- Home /
Simple RTS movement offset
Hey guys!I am developing a little RTS game. I have created unit selection script, that adds to selected units to a list. Then I loop through and give them coordinated to move. I use nav mesh and they(units) are just pushing each other to get to the point(near destination). Does anyone have methods so they don't push each other but still be on a same spot? I have tried:
  public void CalculateOffset(Vector3 _center)
          {
              Vector3 center = new Vector3(_center.x, transform.position.y, _center.z);
              offset = center - transform.position;
          }
to calculate the offset from center of selection rectangle before moving each unit(by looping through the list). Now units are too far from each other. How do I give them different destinations close to original point, preferably in shape?
Your answer
 
 
             Follow this Question
Related Questions
Weird jumpy motion of character in Navigation Fundamentals proect 0 Answers
How the heck AI villager movement? 0 Answers
Move character to specific tiles on map. 1 Answer
Helocopter obstical avoidance (Navmesh agent) 3 Answers
NavMeshAgent not moving 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                