Driving Entities with Maya Fields

Golaem characters can be made to follow Maya fields. It is as simple as driving their particle (with an uniform field, for instance) and apply animation with a specifically configured Locomotion behavior. Here is the step by step process.

Step 1 - drive the particles' positions

Start with an empty behavior for the entity, and a uniform field on the particles to move them in the desired direction.

Entities should now be moving in the correct direction, but with no animation on it.

Step 2 - add and configure the locomotion behavior

Next step is to add a Locomotion behavior and add the single animation file that should be played on the character. The following attributes should be changed:

  • "Create Neutral Animation If Needed" attribute in the Locomotion Attributes should be unchecked;
  • "Replay Ratio" attribute in the First Motion Attributes should be set to 0.

The start percent attributes should also be configured to obtain the desired animation diversity (either with a random, or with pp attributes)

Entities should now be moving with the correct animation and frame offset, but depending on the way the uniform field was configured, some might be trying to circle back to their starting point (which is not the desired effect yet).

The reason for this behavior is that the particles are moving slower than the animation files. The locomotion try to reach back the particle's position, and thus turn in circle to go back behind.

Step 3 - Fine tune the configuration of uniform fields

To fix this, the uniform field's magnitude have to be corrected to ensure the particles are always going at the same speed or faster than the animation (it's not a problem if the particle's are going faster than the animation, so there is no need to try to match the exact same speed than the animation's speed).


A uniform field magnitude of 60 is enough in my case to ensure that the particle is moving faster than the character

Note that whatever speed you use in the uniform field, the character will move with the speed of the animation only (because there is one and only one animation in the locomotion behavior, there is no blend with other animations to fix the speed).


That's it, our characters are finally moving all straight forward with different start frames