Graphics Reference
In-Depth Information
Adding Dynamics to the Character
Game physics settings are found in the Physics properties area, in the same place that physics settings for fluid,
smoke, and collision were found in Part II of this topic. However, for setting game physics, the render engine
must be set to Blender Game. If you haven't set the render engine in this way, a different set of physics options
will be available.
Whenyouaddanobject toascene,itisautomatically created withcertain basicphysical properties, because
the Physics button is pressed by default. This mimics the behavior of earlier Blender versions that did not have
the capability to completely disable all physics effects. In this default state, an object will not move or be in-
fluenced by forces such as gravity; however, the object will act as an obstacle for other physical objects. With
thePhysicsbuttondeselected,therewillbenointeractionbetweentheobjectandotherobjects;physicalobjects
will pass through this object as though it is not there.
When Physics is selected, you then have the option to make the object an actor, which means that forces
and interaction will be calculated with respect to this object and its surroundings. Dynamic objects are able to
moveinresponsetoforcesonthem.IfActorisselected,theobjectisvisiblebythe“near”and“radar”detection
methods.TheGhostoptionpreventstheobjectfrombeinganobstacleandenablesotherobjectstopassthrough
it without resistance. These options are not mutually exclusive. The Ghost option is different from having no
physics applied at all because it allows for the possibility that the Ghost object could also be dynamic, whereas
no dynamic behavior is possible if Physics is fully disabled.
If the object is set to be dynamic, then other parameters related to its mass and collision boundaries also can
beset.Finally,iftheobjectisdynamic,itbecomespossibletosettheobjectasaRigidBodyobject.Thismeans
that not only will it move in space in response to directional forces, but it will also have a full complement of
angular rigid body forces calculated, resulting in a much more realistic tumbling and bouncing motion. In the
case of rigid body simulation, the type of collision boundary selected also will have a considerable impact on
the behavior of the object. You can read more about this in Chapter 8.
In the present case, rigid body dynamics are not necessary for the character. The character should settle on
the floor and treat walls as obstacles, but for the present game the character doesn't need to be able to tumble
and roll around (which would make it difficult to control with the simple walking motion you've set up so far).
For this reason, it is enough to make the character dynamic only, without rigid body physics. To set this up,
follow these steps:
1. Because the character's mesh is parented to the armature, it is enough to ensure that the armature be-
haves dynamically. Select the Armature object in Object mode and make it an actor by clicking the Actor
check box in the Physics buttons panel. Also click Dynamic, as shown in Figure 15-11 .
You can leave the other values as they are for the moment. This is all that's needed to make the armature
dynamic. With the mesh armature-parented to the armature, the mesh's own Physics settings will be dis-
regarded in the game engine environment. To keep things uncluttered, you can disable these settings en-
tirely, as shown in Figure 15-12 .
 
 
Search WWH ::




Custom Search