Animator Controller Scripts (State Behaviours)

In ParaSpace, we have designed a series of script features for Unity’s Animator Controllers. These features can add additional animation effects based on the Animator Controllers.

The following table describes the scripts (state behaviours) we have designed:

Script NameDescription
Para AnimatorIK UsedUsed to control whether the upper body of a player will move from side to side along with the camera's movement.
Para AnimatorLocomotion ControlUsed to control whether a player can move (walk) while playing animations.
Para AnimatorLayer ControlUsed to affect the weight of an animation layer in the specified Animator Controller when playing an animation node.
Para Playable Layer ControlUsed to affect the full weight of a specified Animator Controller when playing an animation node.

How to Add an Animator Controller Script

As shown in the following figure, the Animator Controller has 3 initial animation nodes: Entry, Any State, and Exit. Click any animation node except for the 3 initial nodes. Then in the Inspector panel, click "Add Behaviour" to add a script for the animation node.

Para Animator IK Used

The "Para Animator IK Used" script controls whether the upper body (above the waist) of your character moves along with the camera's rotation. This script is used to handle certain actions that depend on the animation content.

FieldDescriptionEffect
BIK LookatControls whether the player's head and waist move along with the camera.When checked, the player's head and waist can rotate with the camera. When unchecked, their movements are based on the animations played instead.
BIK Left HandControls whether the player's left arm moves along with the camera.When checked, the player's left arm can rotate with the camera. When unchecked, its movements are based on the animations played instead.
BIK Right HandControls whether the player's right arm moves along with the camera.When checked, the player's right arm can rotate with the camera. When unchecked, its movements are based on the animations played instead.

🚧

One-time settings!

Note that these settings, once configured, take effect continuously.

To enable the upper part of the body to move along with the camera in another animation node, you need to add this script again and configure the script settings.

Para Animator Locomotion Control

The "Para Animator Locomotion Control" script controls whether your character can move. If some actions do not allow for movements such as sitting down, you can use this script to disable moving the character through the screen joystick.

FieldEffect
Disable LocomotionWhen checked, players are not allowed to move the character through the screen joystick.

🚧

One-time settings!

Note that these settings, once configured, take effect continuously.

Once you check the Disable Locomotion field, the character will remain immobile until you change this setting of the script in the Animator Controller.

Para Animator Layer Control

The "Para Animator Layer Control" script allows you to control the weight of an animation layer in a specified Animator Controller to affect the blending effect of the entire Animator Controller.

FieldDescription
Playable LayerSelect a target Animator Controller.
LayerSelect a layer of the Animator Controller. The layer number starts from 1.
Goal WeightSet a weight for the target Animator Controller.
Blend DurationAdjust the transition time of the weight to create partially blended animation effects.

In most cases, the animations of the Action layer of a character will overwrite the animations of the Base layer. As a result, the character does not play movement animations.

In this case, the "Para Animator Layer Control" script can be used to adjust the weight of the Action layer. When the Action layer is in the initial node, set its weight to 0, which prevents it from affecting the Base layer animations. When the animations of the Action layer need to be played, set the weight to 1.

🚧

One-time settings!

Note that the weight, once configured, takes effect permanently.

If you want the Animator Controller to take part in animation blending again, you need to set the weight in another animation node to 1.

Para Playable Layer Control

The "Para Playable Layer Control" script has similar features to that of the "Para Animator Layer Control" script. However, the "Para Playable Layer Control" script controls the weight of the entire Animator Controller.

Once this script takes effect, the entire Animator Controller will use a unified weight value. This is suitable for directly handling the blending effect of the entire Animator Controller with other Animator Controllers.

FieldDescription
Playable LayerSelect a target Animator Controller.
Goal WeightSet a weight for the target Animator Controller.
Blend DurationAdjust the transition time of the weight to create partially blended animation effects.

🚧

One-time settings!

Note that the weight, once configured, takes effect permanently.

If you want the Animator Controller to take part in animation blending again, you need to set the weight in another animation node to 1.