[ODE] FAQ - Crude modelling of person movement

Megan Fox shalinor at gmail.com
Mon Oct 24 10:08:35 MST 2005

The standard/old way didn't even involve a ray cast downwards,
necessarily.  All you really need is a cylinder/sphere/whatever with
zero friction, and some means of guaranteeing that it won't snag on
geometry (stairs are a concern - but old FPSes typically had ramps,
and you can also just add special case ramp geometry to stairs that is
used for the entity bodies, then keep a real stair geom around for
ragdolls falling down them and such).

... from there, you can upgrade to forces based on a downwards cast
ray.  This gives you a more versatile mobile body that is far les
likely to snag on geometry, which you'll need for a physically active
RPG or similar, but at the cost of occasional visual oddity.  What
happens if something slides under your feet, for instance?  Your feet
aren't actually modelled, you're a cylinder floating some number of
centimeters off the ground with naught but an invisible/non-collidable
ray suspending you... so small things can and will slide through your
feet, and you'll sort of "pop" to on top of them without some special
handling of cases like that.

(also, you get to model the movement of your player 100% with the ray
method - you're responsible for "foot friction" and everything else -
very powerful, very versatile, but very non-trivial for a good sim)

There are still other solutions, I'm sure, but one of these two would
probably be sufficient for your purposes.  Both have been discussed in
the list archives... look for "lollipop" (the floating body resembles
a lollipop on a stick), "player movement," etc.

On 10/24/05, James Turner <zakalawe at mac.com> wrote:
> I figure this has to be a FAQ, but I can't find it anywhere, so I'm asking
> here:
> Basically, I want to know if there's a standard way to model a person moving
> around a world (terrain, buildings, etc) at the kind of level used by (old)
> first person shooters and similar; namely either a vertical cylinder or a
> cuboid. My basic plan is to float the geometry above the terrain using
> 'something' (a stiff spring? a force based on a vertical ray-cast?), so that
> for normal walking around, the geometry is not colliding with whatever
> surface is being walked on, and so the bottom of the geometry clears any low
> obstacles (and hence, gentle ramps and steps can be traversed)
> Obviously I can try this myself, but I can't believe I'm the first person to
> model such a system in ODE, so any advice is welcomed on making this kind of
> setup robust and usable.
> Many thanks,
> James Turner
> --
> Ignorance more frequently begets confidence than does knowledge.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

-Megan Fox
Lead Developer, Elium Project

More information about the ODE mailing list