[ODE] ODE as a complete FPS solution..

Martin C. Martin martin at metahuman.org
Wed Jun 11 09:49:01 2003


Tim Johnson wrote:
> 
> ----- Original Message -----
> From: "Martin C. Martin" <mcm@ai.mit.edu>
> 
> > This seems like the wrong way to go.  In an FPS, you generally want the
> > player's collision geometry to be a cylinder, so that they can always turn
> > in place.  You don't want realistic physics for the player, because that
> > would be too hard to control.
> 
> This is the kind of thing I'm unsure of. I was hoping we could selectively
> apply physics to the player (for example, no rotations, must slide around,
> can be made immovable).

ODE has two components, collision detection and dynamics.  As far as
dynamics, it seems you don't really need ODE for the player.  Simple
things, like the player bouncing if they hit the ground (for example) are
easy enough to do.  In fact, if you're representing the player as a single
solid object for physics purposes, you don't really need to use ODE for
dynamics, you'll have more control doing it by yourself.

As for collision, if you want to collide the player against the
environment, the big problem is the large list of primitives in the
environment, so you need some very efficient way of finding only the ones
close to the player.  A bsp does that, and I don't think Opcode does that,
it would just test every triangle against the player.  (A BSP uses the
fact that the level geometry is stationary, and precomputes a structure to
help search for the triangles near any point.  Without doing any
precomputing, it will take at least O(n) to collide the level geometry
against the player, which I assume is too slow for you.)

> Our current physics system for the player, while not
> that complex, has a lot of very awkward problems that I'd really like to
> avoid tackling again. Where might ODE cause practical problems?

Quite possibly in the same situations.

- Martin