Game Development Reference
In-Depth Information
this.animation.CrossFade("WalkBackward");
this.transform.position - = this.transform.forward
* speed;
}
else if(Input.GetKey("right shift"))
{
this.animation.CrossFade("RunForward");
this.transform.position + = this.transform.forward
* runspeed;
}
if(Input.GetKey("left"))
{
transform.Rotate(-Vector3.up * Time.deltaTime *
turnSpeed);
}
else if(Input.GetKey("right"))
{
transform.Rotate(Vector3.up * Time.deltaTime *
turnSpeed);
}
if(Input.GetKeyUp("up") ||
Input.GetKeyUp("down") ||Input.
GetKeyUp("right shift") )
{
this.animation.CrossFade("Idle");
}
}
Step 16. Play. The right shift key will make the character run, and the
left and right arrows will turn it. Many other animations come with the
character. Try mapping these to keys in animationControls.js for yourself.
3.6 Biomechanics
Biomechanics is a field of study that examines the mechanical movement of
biological systems such as humans, plants, and animals. It plays an important
part in animation describing the way in which natural hierarchical systems
such as the human skeleton move. The hierarchy for a skeleton begins at the
skull and divides into a number of segments, including arms, legs, hands, and
feet that connect to one another by joints. When higher level joints, such as the
shoulder, move, any connected lower level segments, such as the hand, move
too. In contrast, when a lower level joint or segment moves, such as a finger,
any higher level segments, such as the skull, do not move. Aristotle first wrote
about biomechanics in De Motu Animalium ( On the Movement of Animals ).
Search Nedrilad ::




Custom Search