Root Motion
- CPU Animator
- GPU Animator
Rukhanka has full root motion support for humanoid and generic avatars and animations.
Follow these steps to enable root motion for your model:
-
Configure
Root motion
as usual from motion configuration section of animator importer window: -
Generic rigs only: Configure
Root node
field in model importer window to the bone that will be used to drive object movement. -
Enable the
Apply Root Motion
checkbox in the UnityAnimator
component:
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's root motion code, it can be disabled in RigDefinitionAuthoring
. Root Motion Mode
property controls Rukhanka's root motion operation mode:
- Normal. Standard operation mode. In this mode Rukhanka 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.
Bone entities cannot be moved by GPU animation engine. Therefore root motion is not supported by GPU Animator
.