Game Development Reference
In-Depth Information
Understanding rigid bodies
Rigid bodies are the basic building block of all physics simulations. Like in the real
world, a rigid body has some properties such as mass, position, velocity, inertia as
well as motion states, and so on. The rigid body is assumed to be solid and thus
incapable of being deformed by the exerting forces.
Static, dynamic, and kinematic rigid bodies
There are three different types of objects in Bullet. They are as follows:
• Dynamic (moving) rigid bodies:
° Positive mass
° On every simulation frame, the dynamic world will update its world
transform
• Static rigid bodies:
° Zero mass
° Cannot move or collide
• Kinematic rigid bodies:
° Zero mass
° They can be animated by the user, but there will be only one-way
interaction and dynamic objects will be pushed away, however there
is no influence from dynamics objects
Collision shapes
Like graphical meshes, collision shapes allow collision of a rich variety of different
objects that one might encounter in the real world. Collision shapes don't have a
world position; they are attached to collision objects or rigid bodies. The collision
shape is for collisions only, and thus has no concept of mass, inertia, restitution,
and so on. If you have many bodies that use the same collision shape, it is good
practice to have only one Bullet collision shape, and share it among all those bodies.
This helps save memory. Unlike graphical meshes, collision shapes are not always
composed of triangles, but they can be represented as a primitive shape such as a box
and a cylinder.
For more about collision shapes, visit the official manual at http://bulletphysics.
org/mediawiki-1.5.8/index.php/Collision_Shapes .
 
Search WWH ::




Custom Search