Chapter 5. Action
So far, we have seen static scenes where all interactions are done by moving the camera. The camera transformation is applied to all objects in the 3D scene, therefore we call it a global transform. However, objects in 3D scenes can have actions on their own. For instance, in a racing car game, each car has its own speed and trajectory. In a first-person shooting game your enemies can hide behind barricades then come and fight you or run away. In general, each one of these actions is modeled as a matrix transformation that is attached to the corresponding actor in the scene. These are called local transforms. In this chapter we will study different techniques to make use of local transforms.
In this chapter, we will discuss the following topics:
Global versus local transformations
Matrix stacks and using them to perform animation
Using JavaScript timers to do time-based animation
Parametric curves
Interpolation
In the previous chapter, we saw that when we apply the same transformation...