Sean Lynch wrote:
Since one of my goals is to have Soya able to do everything the Blender
game engine can do and more, we need a more stable and flexible physics
API.
I've documented my proposed changes at
<http://soya.literati.org/PhysicsApi>. Please read and comment. Feel
free to comment directly in the wiki page.
Hi,
I do not agree with the hiding the step() interface for Physics. You
*need* to be able to provide the step duration there. Why? It is simple
- your app has rarely constant framerate. If you couple the framerate to
the physics sim in a fixed manner (e.g. one frame = one step), you are
going to get problems with the physics, as each frame takes a slightly
different amount of time.
What is typically done to avoid this problem is to "cut up" the elapsed
time between the frames and feed it into the simulation as several steps
of constant length. But for this to work, you have to be able to specify
the length of the step. You cannot just take one "good" value and
hardwire it somewhere - for the next application it may not be good enough.
Do not try to be very abstract with the physics engine. ODE can be very
finicky and typically every application requires a lot of tweaking to
get it working right. If you hide the "knobs" to do so, it will be very
hard to get it to do anything non-trivial.
Jan