[ODE] Simple character control

John Miles jmiles at pop.net
Mon Mar 29 19:07:35 MST 2004


I went through all this angst a couple of months ago, and concluded that
most of the time, characters should not be under dynamic control at all --
meaning, no active rigid bodies are assigned to their geoms.

I run my characters and other objects kinematically by default, allowing the
animation API to animate and move them under user or program control.  When
the character or object has been hit by a truck, walks off a cliff, etc., I
switch it from kinematic to dynamic control, letting the physics engine
control it for an amount of time proportional to the magnitude of the event
in question (how high off the ground the character is, etc.)  Skeletal
animations are still applied (walking, thrashing around, whatever), but the
animation package is not allowed to change the character's overall position
or orientation during this time.  When the object's "dynamics lifetime"
expires, the rigid body is deallocated and world-transform control is
returned to the animation package.

At least with ODE, it doesn't appear to be a good idea to try to control a
given object by simultaneous kinematic and dynamic means.  Heavy vehicles
obviously would stay under dynamic control, since they're naturally moved
around by the application of internal or external forces.  But I've never
found a clean way to move human characters in an interactive fashion by
applying dynamic forces to them.  Everything I tried just felt like crap, so
I gave up, and I'm pretty sure that was the right thing to do.

-- jm

> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Megan
> Fox
> Sent: Monday, March 29, 2004 6:32 PM
> To: Ode
> Subject: RE: [ODE] Simple character control
>
>
> And an addenum... what about animation?  Assuming you're not representing
> your character as one big box, you're going to need to set the
> positions of
> each geom on a frame-by-frame basis based on the animation frames
> currently
> being played.  You can't apply a force and hope it gets to "about
> the right
> position"... it needs to be in position, exactly where it should
> be, exactly
> when the graphic gets there, or you risk your body's collision volume
> lagging behind or getting ahead of where the body visually is (leading to
> much whining and screaming from your player base, especially if what you
> have is an FPS with competitive play).
>



More information about the ODE mailing list