Humanoid Control Component

→ Humanoid Control API

The Humanoid Control component has all the options to control your avatar in a simple way. This document describes the available settings.

Virtual Reality

Headsets like HTC Vive and Oculus Rift are supported when Unity is configured for their support.

In Unity 2019.3 and newer, the XR Plug-in Management needs to be enabled in the Project settings. See for more details in the Unity XR page.

In Unity 2019.4 and older, Virtual Reality Supported should be enabled in the Player Settings-XR Settings. If Virtual Reality Supported is deselected, a message will appear in the top of the script to remind you that the virtual reality is switched off.

Targets

Targets are used to move the body. The control of an avatar is split into six body parts: head, 2 arms, torso and 2 legs. Each body part is controlled by a target: Head, Left/Right Hand, Hips and Left/Right Foot. Targets are not shown in the hierarchy by default but can be made visible by clicking on the Show button for that target.

Instead of the normal targets, you can also use custom target by replacing the default targets with references to other transforms. A good example are hands which are connected to a steering wheel. In this example two empty GameObjects are set at the right locations of the steering wheel. The Left and Right Hand Target show then point to the Transforms of these empty GameObjects.

Every target will have Target script attached which give additional control over these targets:

Input

Enables you to choose which tracker devices are supported. Any combination of trackers can be chosen, even when the device itself is not present. Only when the devices are actually present in the system they will be used in the tracking. During game play you can see in the inspector which Input devices are actually present and tracking at any point.

Humanoid Control will combine multiple trackers using sensor fusion to achieve the best possible tracking result.

First Person Camera

Adds a camera at the eye position of the avatar. If virtual reality has been enabled, this will also enable head tracking for VR headsets.

Animator

Procedural and Mecanim animations are supported for body parts not being tracked by an input device. Mecanim animation is used when an appropriate Animation Controller is selected as parameter. Built-in procedural animation will be used when no Animation Controller is selected. See also Animations.

Pose

This will set the base pose of the avatar. For more information see Pose.

Networking

Remote Avatar

For networking setups, a remote avatar has to be selected which is used for the representation of the avatar on remote clients. This enables you to optimise the avatar mesh between first and third person views of the same avatar.

Movement

This sets a number of parameters for the locomotion of the avatar:

Forward SpeedThe maximum forward speed in units/sec.
Backward SpeedThe maximum backward speed in units/sec.
Sideward SpeedThe maximum speed while strafing in units/sec.
Maximum accelerationThe maximum acceleration allowed when changing speed in units/sec./sec When set to 0, no acceleration limit is used.
Rotation SpeedThe maximum rotation speed along the Y axis in degrees/sec.
Step OffsetThe maximum ground height different which the humanoid can pass.
Proximity SpeedThis will decrease the movement speed of the humanoid when being close to static objects.

Settings

Show Real objectsShows the tracking devices in the scene. See also The Real World.
Show SkeletonsShows skeletons for optical hand and/or body tracking systems.
PhysicsEnables hand physics and collisions during walking. See also Full Physics.
Use GravityWhen this is enabled the avatar will fall down when there is no object underneath its feet.
Body PullWhen enabled, you can pull the humanoid around while holding static objects with handles.
HapticsWill use haptic feedback on supported devices when the hands are colliding or touching objects.
Calibrate at StartWill initiate a scaling calibration when the tracking of the player starts.
Start PositionAvatar Position: the user will start at the position of the avatar in the scene.
Player Position: the user will start at the location within the physical tracking space.
ScalingNone: no scaling is done.
Set Height To Avatar: adjusts the vertical tracking to match the avatar.
Scale Tracking to Avatar: scales the tracking input to match the size of the avatar.
Scale Avatar to Tracking: resizes the avatar to match the player size.
Don’t Destroy on LoadThis option will make sure that the humanoid is not destroyed when the scene is changed.
Disconnect Instances(Prefabs only) Will disconnect the instance from the prefab when they are included in the scene.