Animations

Animations can be used when other trackers are not tracking or not available. They can be enabled using the Animator option in the Input section of the Humanoid Control script.

By default, the animator uses a builtin procedural animation. This is overridden when setting the Runtime Animator Controller parameter. Humanoid Control implements the following animation parameters:

float ForwardSpeed The forward/backward speed. Negative is backward walking. Unit is units(meters) per second.
float SidewardSpeed The left/right speed. Negative is left strafing. Unit is units(meters) per second
float TurnSpeed The turning speed. Negative is turning left. Unit is full rotations (360 degrees) per second.

Please note the unit of the parameters. Great care should be payed to this when creating the animations, because it is not possible to use root motion (see below).

If the animation root speed does not match the required units of speed, you can adjust them using the Speed parameter of the Animation State (see Unity3d – Animation States ).

For example, when the turning animation is set up such that it takes 4 seconds for a full rotation, the Speed parameter should be set to 0.25.

Root motion

For the animations to work well they should not contain root motion. This is because we need to be able to move the character from the VR headset, not from the animation, or players will get motion sickness.

To get the right behaviour, ensure that the following options are checked on the imported animations:

Loop Time -> Loop Pose
Root Transform Rotation -> Bake Into PoseRoot Transform Position (Y) -> Bake Into Pose
Root Transform Position (XZ) -> Bake Into Pose

Targets

When the Animation option is enabled on the Humanoid Control script, it is possible to select whether procedural animation should be used for each target. If Procedural Animation is deselected the animation controlled by the Runtime Animator Controller set in the Humanoid Control script will be used. If the Runtime Animator Controller is not set, no animation will be used.