Headsets like HTC Vive, Gear VR and Oculus Rift are only supported when Virtual Reality Supported is selected in the Player Settings-Other Settings (Unity 5, 2012.1) or Player Settings-XR Settings (Unity 2012.2 and higher). If Virtual Reality Supported is deselected, a message will appear in the top of the script to remind you that the option is switched off.
Targets are used to move the body. The control of an avatar is split into six body parts: head, 2 arms, torso and 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:
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 all headset supported natively by Unity (at the moment OpenVR, Oculus, Gear VR, Cardboard and Hololens).
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. Builtin procedural animation will be used when no Animation Controller is selected. See also Animations.
This will enable networked multiplayer for Humanoids. Optionally, a Third Person Avatar can be selected which is then used for representations of the avatar on remote clients. This enables you to optimise the avatar mesh between first and third person views of the same avatar.
|Show Real Objects||Shows the tracking devices in the scene. See also The Real World.|
|Physics||Enables hand physics and collisions during walking. See also Advanced Physics.|
|Haptics||Will use haptic feedback on supported devices when the hands are colliding or touching objects.|
|Use Gravity||If there is not static object below the feet of the avatar the avatar will fall down until it reaches solid ground.|
|Proximity Speed||Reduces the walking speed of the humanoid when in the neighborhood of objects to reduce motion sickness.|
|Scaling||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. Set Height To Avatar adjusts the vertical tracking to match the avatar size. Move Height to Avatar does the same but also resets the tracking origin to the location of the avatar.|
|ScaleAvatarToTracking()||resized the avatar to match the player size.|
|SetPlayerHeight(float height)||manually sets the height of the player.|
|ScaleTrackingToAvatar()||scales the tracking input to match the size of the avatar.|
|SetTrackingHeightToAvatar()||changes the tracking height to match the size of the avatar. Tracking is not scaled. The Y values are adjusted instead. This is useful for changing from standing to sitting position.|
|MoveTrackingHeightToAvatar()||changes the tracking height in the same way as SetTrackingHeightToAvatar() but also moves the tracking origin to the location of the avatar instead of moving the avatar to the location of the player.|
|Calibrate||resets the avatar according to the Scaling setting and tracking information|
|MoveForward(float z)||moves the avatar forward or backward with velocity z.|
|MoveSideward(float x)||moves the avatar sidewards (strafing) with velocity x.|
|Rotate(float angularSpeed)||rotates the avatar with angular velocity angularSpeed|