Polarith AI
1.8

◆ ComputePosition()

override Vector3 ComputePosition ( )
virtual

Overwritten method to build up a FormationV, i.e., placing agents as a V, by computing the AIMFormation.TargetPosition of each agent.

Units are placed equidistantly on lines with AgentsPerLine as thickness of the V-shape, and Formation.Spacing as distance between them. The last layer may be sparse since there are probably not enough units. This method computes only the position of a single agent with respect to the whole formation.

Implements Formation.

Imprint