Root Motion
- CPU Animator
- GPU Animator
Rukhanka Animation has full root motion support for humanoid and generic avatars and animations.
Follow these steps to enable root motion for your model:
-
Configure
Root motionas usual from motion configuration section of animator importer window:
-
Generic rigs only: Configure
Root nodefield in model importer window to the bone that will be used to drive object movement.
-
Enable the
Apply Root Motioncheckbox in the UnityAnimatorcomponent:
Custom root motion handling
Sometimes root motion calculated movement needs to be propagated to other systems. There is the RootMotionVelocityComponent that can be used to obtain root motion velocity for the current frame. If you don't want to move the animated entity by Rukhanka Animation's root motion code, it can be disabled in RigDefinitionAuthoring. Root Motion Mode property controls Rukhanka Animation's root motion operation mode:
- Normal. Standard operation mode. In this mode Rukhanka Animation will move entity according to root motion tracks if this is requested.
- Disable Builtin Movement. Calculate root motion, but do not apply it to the entity position.
In both modes RootMotionVelocityComponent gets updated with current frame velocity values.
Read the component after RukhankaAnimationSystemGroup has updated. worldVelocity is the current frame's world-space linear velocity; deltaPos and deltaRot are the animation movement delta in the rig's movement space. Do not treat deltaPos as an already world-space displacement or multiply it by delta time a second time. When applying movement through a character controller, use Disable Builtin Movement to avoid moving the rig twice.
In User Defined rig mode, enable root motion on Rig Definition Authoring itself. CPU animation is required in either mode. See Root Motion sample for a configured rig.

Bone entities cannot be moved by GPU animation engine. Therefore root motion is not supported by GPU Animator.