Humanoid Control for Unity v4
|
Humanoid Control Free
Humanoid Control Pro
There are two ways to include an humanoid into a scene: starting with an avatar and starting with the Humanoid Control script.
In this case you start by putting an avatar prefab into the scene. This avatar needs to fulfil the requirements of a Mecanim avatar (see below). A couple of avatar prefabs are included in the Grocery Store Demo sample in the package.
The next step is to attach the HumanoidControl script to the avatar. You can do this by selecting the Add Component button in the Inspector and selecting the HumanoidControl script.
In this case we start with an Empty GameObject. We will then add the HumanoidControl script to the object by selecting the Add Component button in the Inspector and selecting the HumanoidControl script.
You will see that the script could not detect a suitable avatar because there isn't an avatar attached yet. We can now add an avatar by dropping an avatar onto the Empty GameObject we created. It will become a child of this GameObject.
This makes it easier to replace an avatar at a later moment
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:
If you need to grab objects with the alternative avatar you can 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 size and proportions as the standard avatar. Using small or giant avatars will result in strange body moments.
The avatar should face in the forward direction of the root transform. Other directions will result in twisted poses.