Game Development Reference
In-Depth Information
5. The Create Ragdoll window should now appear. Use the circular buttons on the right
side of the window to add bones to each of the specified fields. Add the bone names as
shown in Figure 10.13. Since there are so many bones, use the Search field at the top
of the Select Transform window that pops up to help you find your bones by name.
Figure 10.13
Using the Create
Ragdoll window
If you play the scene now, you may notice that the zombie's feet stay where they are
while the rest of the body crumples to the ground. This is because the foot bones are not
connected to the legs with a parent/child relationship, but are instead attached to the
LegControl bones. To fix this, you will manually turn these bones into part of the ragdoll.
1. To incorporate the foot and toe bones into the ragdoll, select them in the Hierarchy
view (they will be buried in the zombie's Armature object) and add a Character Joint
and Capsule Collider to each bone, both of which are found in the Components b
Physics menu.
2. In the Character Joint component panel found in the Inspector view, target each
bone to the bone that would be its parent (shin bones for the foot bones, foot bones
for the toe bones) with the Connected Body variable.
3. In the Capsule Collider options, switch the Direction variable to the x-axis for each
bone and resize the collider to fit nicely around the part of the mesh that bone gov-
erns, as shown in Figure 10.14.
Search WWH ::




Custom Search