Turn Layer

Description

Turn Layer is a unique animation feature, which is designed to make the character turn in place if yaw angle is exceeded. Unlike many implementations, this layer does not make any changes to the character rotation logic.

Note: this layer works with Look Layer.

It is required to add a TurnOffset float property to the Input Config. This value will be used by the r to adjust the yaw rotation of the character:

Then, the Turn Layer must be added in the end of the Animator Profile. The layer itself will be rotating the character root bone against the controller rotation, which will make the player stay in place.

The next step is to make the Look layer use the TurnOffset property:

Finally, TurnLayer settings need to be adjusted.

Properties

  • Character Root Bone: this is the top bone in the skeleton hierarchy.

  • Angle Threshold: maximum allowed yaw rotation. If this value is exceeded, the turn will be performed.

  • Turn Curve: defines the easing of the turning value.

  • Turn Speed: the speed of the character turning.

  • Turn Input Property: the turn offset value. It will be modified by the turn layer, and will be read by the Look layer.

  • Animator Turn Right/Left Trigger: names of animator triggers, which will play the turning animation. These properties are optional, and only required if there are turning animations in the controller.

In order to use custom turning animations, it is crucial to specify them in the Animator Controller:

These animations are usually played via a trigger property, which are set in the Turn Layer.

Last updated