Game Development Reference
In-Depth Information
The shape of the collider is independent from the shape of the object itself. Consequently,
it is possible to have an object that looks as cube but behaves physically as sphere. It is also
possible to position the center of the collider away from the center of the shape, or scale its
size to make it larger or smaller than the visible object. These modifications can be made
by setting the values of Center and Radius variables of the collider. Once an object has a
collider, it becomes a solid entity that collides with other objects in the scene. However,
collisions between objects can be detected and resolved only when the objects are under
the control of the physics simulator. This fact justifies why colliders have had no effect in
our previous examples, even they existed in all objects we have made.
The second important component for physics simulation is the rigid body, which is shown in
Illustration
44. When this component is added to the object, it makes it become physically active. This
component has a collection of interesting properties, which we are going to discuss soon.
Search WWH ::




Custom Search