Golaem Crowd enables to define formation shapes to be followed when navigating. It is especially useful when dealing with armies divided in small units navigating together. To achieve this, a GroupEntityType
should be defined on top of the regular EntityTypes
, and a SetFormation Behavior
must be used.
Create One (or more) EntityType(s)
These are the EntityTypes which will be part of your groups. Do not forget to link a Character File (.gskm) for each of them (see Quickstart for more details)
Create A Group EntityType
A Group EntityType
will allow you to create groups of entities that behave as a single Entity. The SetFormation Behavior
can only be applied to this kind of entities.
You do not need to add EntityTypes in this Group EntityType, it is enough to define them in the Particle Tool Locator, as usual (see next step)
Create A Formation Shape And Place Your Characters
As usual, created EntityTypes are added in the EntityTypes Attributes Panel. You need to add your GroupEntityType in the GroupEntityType panel to specify that the placed Entities will be part of this group.
Emit the particles. It will create a single group entity from your GroupEntityType.
If you want to create more groups of this type, you can just move the Population Tool Locator and re-emit particles (either in the same or in a different particle system). You can also create different Population Tool Locators using the same GroupEntityType.
After creating particles, do not forget to link all created particle systems to a Crowd Field
Setup Group Behavior
The next step is to configure the behavior of the group. If you open the Behavior Editor
, you should be able to see both the EntityTypes forming your group and the GroupEntityType controlling them in the Behavior Outliner.
When these EntityTypes are used with a GroupEntityType, any Goto Behavior
will be ignored on the individual entities, as they act as part of the group, and follow it.
The SetFormation Behavior uses Population Tool Locators as input in order to define the shape of the formation.
The Population Tool Locator used to place your characters can be used, but you can also map another Population Tool Locator to keep another shape. It is even possible to map multiples Population Tool Locators so that they will transition between shapes each time the SetFormation Behavior is restarted.
Note that you do not have to emit particles with the Population Tool Locators used only as formations input.