IK

An IK Behavior (beIK) makes an Entity reach a given target with a given body limb.
IK Behavior in the Behavior Editor

Creation

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeIK Node
  • MEL command: glmCrowdBeIKCmd;

Configuration

An IK Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

IK Attributes

In Target Locator

Maya locator attached to the IK Behavior. The locator will be used as a target for the IK constraint on the given IK bone. Notice that, this locator can be animated. If no locator is mapped or there is no target expression, the scene origin (0,0,0) will be used.

In Target Expression Expression that evaluates to a target (3D vector). If no locator is mapped or there is no target expression, the scene origin (0,0,0) will be used.
Target Mode This attribute allows a choice of two target mode :
  • Absolute: The locator position will be used as a target for the IK constraint on the given IK bone.
  • Character Relative: The difference between the locator position and the center of the scene will be added to the root position of the Entity and used as a target for the IK constraint on the given IK bone.
  • Character and Ground Relative: The difference between the locator position and the center of the scene will be added to the root position of the Entity and used as a target for the IK constraint on the given IK bone. On top of that the height between the locator and the center of the scene will be conserved relatively to the Ground. To use this mode, a Terrain Locator should have be assigned to the Entities.


Character Relative Target Mode


Ground Relative Target Mode

Target Reach Threshold Maximum distance between IK bone and target to consider the target as reached.
Bone Name Name of the effector bone which will be used to reach the IK target (e.g. head, left wrist, right wrist).
Bone count

Number of bones of the body limb chain which will be used to reach the IK target;

Result of an IK behavior with a bone range of 2 (LEFT) and a bone range of 7 (RIGHT)

Starting / Stopping Duration Attributes

The Starting / Stopping Duration value determines the time (in seconds) during which the animation goes from inactive to fully active (or vice versa). This time can be used to transition smoothly between two behaviors. When transiting from one behavior to another, it is the average time between the Stopping Duration of the stopping behavior and the Starting Duration of the starting behavior which is used as transition time.

Starting / Stopping Duration Mode

This attribute allows a choice of two modes :

  • Random: Randomly set the Starting / Stopping Duration value between the specified "Starting / Stopping Duration Min" and "Starting / Stopping Duration Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Starting / Stopping Duration Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Start Percent value.

The Starting / Stopping Duration value is in seconds.

Starting / Stopping Duration Min See Random option of the Starting / Stopping Duration Mode above
Available only when the Starting / Stopping Duration Mode is set to "Random"
Starting / Stopping Duration Max See Random option of the Starting / Stopping Duration Mode above
Available only when the Starting / Stopping Duration Mode is set to "Random"
Starting / Stopping Durationpp Name Name of the float per-particle field of the relative particle system, containing the Starting / Stopping Duration Mode value which will be used (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Starting / Stopping Duration value is set to 0 if the ppAttribute name is empty or invalid
Available only when the Starting / Stopping Duration Mode is set to "Per-Particle Attribute"