Game Development Reference
a convincing connection with the object. For that reason, if a Sim is
required to pick up a guitar, the character will walk over to the item first
and position itself such that when the pickup animation plays it looks as
though the object is picked up.
Inverse kinematics is somewhat more complex than forward kinematics. It
performs the reverse operation of forward kinematics, asking what the angles
of the joints must be to position the end effector at a specific location. For
example, if the shoulder is at (10,10), how should the bones in the arm be
positioned to place the hand at (16,9)? This is not as simple as it might first
appear because, when you think about it, the joints in the arm can make a
variety of angles, as shown in Figure 3.13 .
Try it for yourself. Grab hold of a doorknob and, keeping your shoulder at the
same location in space, see how many different positions you can manipulate
your arm into such that your hand stays touching the doorknob. These are just
the movements for your arm, which consists of three basic joints and three
principal segments. Imagine calculating inverse kinematics for something
with 10 or more joints.
Although we consider the shoulder as a single joint, for the purposes of
inverse kinematics, it is actually three. If you hold your arm straight out to
the side you will be able to raise and lower it (like flapping to fly), move it
FIG 3.13 Three solutions to an
inverse kinematic problem.