[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The way you use this physics module in your application is very application specific. Since games are the most common type of application this section will mostly cover recommended usage for games.
If your game is a space-ship type game, I would recommend putting all your game objects under primary control of the physics engine. Thrown in some gravity wells for planets, subclass `ctForce' to create your rocket engine, add a rigid body for each game object, apply impulses when something gets hit and things should work out well for you.
If your game has animated models running around and blowing each other up or running obstacle courses, you probably do not want to put everything under control of the physics module. I would recommend using the physics module for special effects and appropriate game-play objects. For instance, attach a tail to your character as an articulated body, use rigid bodies for gibbs or explosion debris, have an articulated body for your characters that only gets activated when you want them to act like a rag-doll, use articulated bodies for ropes that your char can swing on, trees that sway in the wind, etc.
I would recommend using several ctWorld
's that isolate distinct element
from each other, so that during a catastrophe time-slicing search your whole
simulation doesn't bog down. For instance, have one `ctWorld' for all
your debris and body parts, if you have a tail on your main character add that
as an articulated body to its own `ctWorld'.
This module is a tool, and used properly, could really enhance the reality of your game worlds. You need to control and interpret the results to make sure they make sense and are consistent with your games behavior.
At the time of writing, continuous contact with the ground is only partial implemented (the solver exists). This is a pretty important feature, and its absence limits what you can do with this module. However the main tools; impulse response (rigid body and articulated body), grounded articulated bodies and `ctKinematicEntity' attached articulated bodies. These features are sufficient for many nifty dynamically controlled elements.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |