Graphics Programs Reference
In-Depth Information
With the controls set as shown in Figure 19.11, you can drive the actor around the plane.
Play with the mouse buttons and you will soon get the hang of it. Note that the sphere only
rotates in one direction, but you can add another set of controls to rotate it in the opposite
direction. Maybe change the mouse sensor to keyboard and use the
A and S keys for rotation. You could also change all the sensor con-
trols to keyboard and use a pattern of keys. The foregoing is about
as simple as it gets, so it's now your responsibility to research and
experiment further.
Figure 19.12
19.2 Game Animation
The game engine physics may be used to record an animation. In
Chapter 9, we discussed animating the complex movement of an ob-
ject by following a curve path; this procedure saved time by negat-
ing the application of key frames and allowed the movement to be
easily modified by changing the shape of the curve path. Sometimes
you won't be in a position to set a predetermined path, so you may
wish to experiment to find the best movement to depict what you
wish to show. This is where game phys-
ics is useful; you can drive your object
around the scene and have the move-
ment recorded.
Continue with the previous game
engine setup and in the properties win-
dow - “Physics” button - “Physics” tab,
click on the “Physics Type” drop down
menu and change “Dynamic” to “Rigid
Body” (Figure 19.12). In the informa-
tion window header at the top of the
screen, click on “Game” and tick “Re-
cord Animation” (Figure 19.13)—when your
object is driven using the game engine, the
movement will now be recorded. When you
exit the game (by pressing Esc) and return to
the 3D window, pressing Alt + the A key will
replay the movement in the 3D window.
Before doing any driving, bear in mind that
as soon as you press the P key to start the game,
the animation recording is up and running.
Look at the properties window - “World” but-
ton - “Physics” tab and note that the “Physics
Steps: FPS” value is 60 (Figure 19.14). In the
“Render” button - “Stand Alone Player” tab,
note that the “Quality: FPS” value is also 60,
so the animation is recording at 60 frames per
Figure 19.13
Figure 19.14
 
Search WWH ::




Custom Search