Including the avatar
The easiest way to setup a VR implementation is to include one of the prefabs offered in the package.
Requirements for the avatar
The software comes with a standard MakeHuman avatar but you can replace this easily.
Just remove the default avatar from the InstantVR folder and include you own avatar. You should ensure that your avatar has a well formed rig. The script uses the bone structure derived in the Unity Mecanim rig to find the correct bones to move around. Check the rig as follows:
- In the prefab, select the ‘Rig’ tab. Ensure the ‘Animation Type’ is set to ‘Humanoid’.
- Ensure ‘Optimize Game Objects’ is deselected.
- Click ‘Configure…’
- Ensure that the following bones are correctly mapped:
- Body: Hips, Spine
- Left Arm: Upper Arm, Lower Arm & Hand
- Right Arm: Upper Arm, Lower Arm & Hand
- Left Leg: Upper Leg, Lower Leg & Foot
- Right Leg: Upper Leg, Lower Leg & Foot
- Head: Neck
If you need to grab objects with the alternative avatar you will need to add colliders to the hand and fingers manually. For the thumb, the intermediate joint should at least be used for a collider. For the fingers the proximal joint should at least have a collider.
The avatar needs to have the same sizes and proportions as the standard avatar. Using small or giant avatars will result in strange body moments.