Game Development Reference
In-Depth Information
while (link->next){
link = link->next;
link->rot.z = 0.0;
}
}
link = links.next;
while(link){
link->CreateMatrix();
link = link->next;
}
}
Setting joint limits and bending strengths
In the previous section, the ease of rotation at each joint was the same.
Because the algorithm starts at the end of the chain, this favours the
rotation of the later links. It may be that you would prefer most of the
rotation to come from the middle of the chain. If we only allow some links
to rotate by less than 100 per cent of the optimum rotation we can favour
certain links. In our four-link chain we could have a scale value for the
angle of rotation set to 0.3, 0.1, 0.5, 0.6 starting from the root object. In
this way, the second link up the chain has a greater influence on the way
the goal is reached.
Another technique to ensure that rotations are applied as intended is to
limit the maximum rotation. If a link is locked so that beyond certain
minimum and maximum rotation it cannot move, then this forces the
rotation of a chain to reach a goal, so it is handled in a way that feels
correct. A good example of this is our knee joints. The joint is capable of
rotating around 140° back from straight, but cannot rotate forward. If the
software allowed forward rotations then a walk would seem very awkward
to the viewer.
Blending IK solutions with forward kinematic animation
There are many times when you will want to switch from a forward
kinematic solution to a motion problem, to an IK solution. Suppose a
character places a hand temporarily on a fixed surface such as a table or
wall. The hand should appear to be stationary on the surface. If the body
Search Nedrilad ::




Custom Search