Animator Motion gives an active ability a timed movement or rotation curve when its animation does not provide suitable root motion. Use it for a short, authored motion such as stepping through a door or turning during a first-person animation; prefer animation root motion when the clip already contains the movement you need.

Before you begin

  • Add or select the ability that should own the motion.
  • Decide which local axes the ability needs. X moves right or left, Y moves up or down, and Z moves forward or backward relative to the character.
  • Confirm how the ability starts and stops. The Animator Motion asset supplies deltas only while the ability is active; its Duration does not start or stop the ability.

Create and assign the motion

  1. In the Project window, select Assets > Create > Opsive > Ultimate Character Controller > Animator Motion.
  2. Choose a filename and save the new .asset inside the project’s Assets folder.
  3. Select the new asset. A new Animator Motion starts with a Duration of 5, and all six curves are flat at 0.
  4. Set Duration to the final time shared by the position and rotation curves.
  5. Expand Delta Position and edit X Position, Y Position, or Z Position for translation.
  6. Expand Delta Rotation and edit X Rotation, Y Rotation, or Z Rotation for Euler rotation in degrees.
  7. Select the character, open the ability in the Ultimate Character Locomotion component, and expand General.
  8. Assign the asset to Animator Motion.
  9. Set Use Root Motion Position to True when the asset supplies position, and set Use Root Motion Rotation to True when it supplies rotation. An individual ability may already have a different default, so verify both fields instead of assuming the asset enables them.

Ability General settings with Use Root Motion Position set to True and OpenDoorAnimatorMotion assigned to Animator Motion

The example asset below lasts 1.883 seconds. X and Y position remain at zero, Z begins contributing after about one second, and all rotation curves remain at zero.

Animator Motion asset with a 1.883-second duration, a delayed Z position curve, and zero X, Y, and rotation curves

Shape the curves

The horizontal axis is elapsed time since the ability started. The vertical value is the position or rotation delta contributed on that controller update; it is not the character’s total displacement or angle from the start.

For a motion that pauses and then steps forward, keep Z Position at zero during the pause, raise it during the step, and return its final key to zero. Keep every unused curve flat at zero. Use a small, visible test curve first, then tune it while watching the result in Play Mode.

Changing Duration moves the final key of each curve to the new time. It does not proportionally retime intermediate keys, so inspect and reposition those keys after changing the duration of an established motion.

Key choices

Animator Motion or animation root motion

Animator Motion is added to the root-motion position already collected for the update, and its rotation is composed with the collected root-motion rotation. If the animation clip already moves or turns the character, a nonzero Animator Motion curve adds a second contribution. Remove one source or keep the overlapping Animator Motion curves at zero unless the additive result is intentional.

Position, rotation, or both

A position-only asset can keep all rotation curves at zero; a turn-only asset can keep all position curves at zero. No Override leaves the character’s existing setting in control, and True enables the channel while the ability is active.

Version 3 has a root-motion override limitation: the rotation-disable branch checks Use Root Motion Position instead of Use Root Motion Rotation when an ability starts. Rotation: False with Position: No Override or True does not reliably disable rotation, while Position: False with Rotation: No Override can disable it unexpectedly. The stop path uses the rotation field, so these mismatched combinations can also leave override bookkeeping unbalanced. Avoid those combinations until the source is corrected; False on both channels is the supported way to disable both together.

One asset or several variants

Animator Motion is a shared ScriptableObject. Reusing one asset gives multiple abilities the same curve data, and editing it changes every reference. Duplicate the asset before tuning a variant that should behave differently.

How it runs

When the ability starts, its elapsed motion time begins at zero. On each active update, the ability evaluates all six curves at that elapsed time. Position is transformed from the character’s local axes and added to the pending root-motion position; Euler rotation is converted to a quaternion and multiplied into the pending root-motion rotation.

The character controller applies a channel only when root-motion position or rotation is enabled. Other active abilities can also add motion or disable a channel, so compatible abilities should not carry overlapping Animator Motion assets unless their combined result is intentional.

Stopping the ability stops further curve evaluation. Starting it again resets elapsed time to zero. Reaching Duration alone does not stop the ability, activate a State, or send an Animator Motion event; those remain part of the owning ability’s normal lifecycle.

Verify in Play Mode

  1. Give one curve a clearly visible interval and return its final value to zero.
  2. Enter Play Mode and start the ability while viewing the character from an angle that makes the chosen axis clear.
  3. Confirm the character remains still where the curve is zero, moves or rotates during the nonzero interval, and stops receiving motion when the curve returns to zero.
  4. Confirm the ability stops through its configured stop condition. If the ability remains active after the asset duration, that is expected until its own stop rule succeeds.
  5. Start the ability again and confirm the curve begins from time zero rather than continuing from the previous run.

Troubleshooting

The curve is visible but the character does not move or rotate

Check: Confirm the ability is active, the asset is assigned to Animator Motion, the relevant curve is nonzero, and Use Root Motion Position or Use Root Motion Rotation is True or otherwise enabled on the character.

Fix: Enable the required root-motion channel. Check other active abilities and the unsupported mixed False combinations above, including their effect after stopping; the position and rotation disable overrides cannot be assumed independent in this version.

The character moves or turns too far

Check: Determine whether the animation clip already supplies root motion on the same channel. Animator Motion is additive rather than a replacement.

Fix: Remove the Animator Motion contribution, remove the duplicate animation root motion, or reduce the corresponding curve values.

The character keeps drifting after the intended motion

Check: Inspect the last value of each position and rotation curve. The ability continues evaluating the curve while it remains active.

Fix: Return the final delta values to zero and configure the ability’s stop condition. Do not rely on Duration to stop the ability.

Changing Duration gives uneven timing

Check: Duration changes the final key time, but intermediate keys keep their existing times.

Fix: Reposition the intermediate keys after changing Duration, or author the intended duration before shaping the detailed curve.

Editing one motion changes another ability

Check: Both abilities reference the same Animator Motion asset.

Fix: Duplicate the asset and assign the copy before creating a separate variation.

Developer details

AnimatorMotion derives from ScriptableObject. It exposes XPosition, YPosition, ZPosition, XRotation, YRotation, and ZRotation as AnimationCurve properties. EvaluatePosition(float time, ref Vector3 position) writes the sampled local position delta, while EvaluateRotation(float time, ref Quaternion rotation) writes the sampled Euler curves as a quaternion. The owning ability exposes the asset through Ability.AnimatorMotion.

The base Ability.Update() performs this evaluation for every active ability with an assigned asset. Multiple active assets therefore add their position contributions and compose their rotations in ability update order. The character’s Root Motion Speed Multiplier scales animation-provided root motion when it enters the controller; it does not scale the curve contribution that Ability.Update() adds directly. Adjust the Animator Motion curves when only this asset should change.

Animator Motion has no dedicated start, stop, State, or event API. Use the owning ability’s OnCharacterAbilityActive notification, or OnCharacterItemAbilityActive for an item ability, when code needs to observe its lifecycle. See Events and New Ability for those extension points.