front-end / back-end: AIMFormationCircle
| FormationCircle
inherits from: AIMFormation
| Formation
Source code available on GitHub.
This behaviour arranges the agent as part of a formation with the shape of a circle.
Similar to our other formation behaviours that are based on AIMFormation
, Formation
respectively, the position is based on the properties of the base class. The formation grows automatically in depth from the inside to the outside, while the last (outer) layer may be sparse if there might be not enough agents to fill the last layer appropriately.
Figure 1 shows the influence of the Solid
property in 2D that controls if the agents are placed next to each other (solid) or on the boundary only (non-solid).
Figure 1: Shows the circle formation in solid and non-solid option.
This component has got the following specific properties.
Property | Description |
---|---|
Solid | Toggles if the agents should be placed next to each other without gaps (solid) or at the boundary only (non-solid). |
UpVector | Defines the default axis for the width of the formation, i.e., you can flip the reference direction in which the formation is built. If set to [0,0,0], the XY-plane is used, and the Z-axis is up. |
The layers grow linearly in-depth. Hence the i-th layer covers agents based on the radius and the Spacing
. There might be not enough agents to cover all these agents to fill the last layer. Thus we compute a sparse layer that places the agents equidistantly and visually appealing.