Links

Root Motion

Root motion, if enabled, makes the parent object (the one with the Animator component) move instead of the hips of the armature. This allows collision detection in the implementation of the character controller.
Please note that this feature is experimental and may require some adjustments on the implementation to work.
Before
After

Enabling the root motion

Root motion is enabled for a character via the following overloads when registering the players' animators:
KinetixCore.Network.RegisterRemotePeerAnimator(Animator, RootMotionConfig)
And
KinetixCore.Animation.RegisterLocalPlayerAnimator(Animator, RootMotionConfig)

Configuring the root motion

Example of configuration:
KinetixCore.Animation.RegisterLocalPlayerAnimator(localPlayerAnimator, new RootMotionConfig() {
ApplyHipsYPos = true,
ApplyHipsXAndZPos = true,
BackToInitialPose = true,
BakeIntoPoseXZ = false,
BakeIntoPoseY = false
});
A few options are available :
  • ApplyHipsYPos => Sets the root Y position to be the hips Y local position
  • ApplyHipsXAndZPos => Sets the root X and Z positions to be the hips X and Z position
  • BackToInitialPose => If set to true, the avatar will revert to its initial position when the emote has finished playing
  • BakeIntoPoseXZ => If set to true, the emote will be played in place for the X and Z axis, meaning the avatar won't move horizontally during the animation
  • BakeIntoPoseY => If set to true, the emote will be played in place for the Y axis, meaning the avatar won't move vertically during the animation