[ODE] Simple character control
Jon Watte
hplus-ode at mindcontrol.org
Tue Mar 30 11:15:49 MST 2004
> If you separate animation data from collision data, you seemingly open
> yourself to any number of inconsistent interactions. Player sphere is too
I explicitly stated that the extreme end of realism would be to simulate a full skeleton, and let that drive the animation joint hierarchy. However, for games that put hundreds, or even tens, of characters on the screen, this is not tractable (at least if you have other things to do with your CPU, too, and want to run on machines that people actually own). Thus, the simplified solutions I suggested, in response for a request for a _simple_ scheme. Your suggested solution does not fit the problem parameters.
> big, so the player can't actually "touch" the wall, player sphere is too
> small, so the player's arm can clip through the wall if the animation is at
> the wrong point at the time, player's tall hat clips through a low archway
You see these in games all the time, although you can get it surprisingly good for most common cases.
> I see that the docs suggest not using setposition and setorientation... but
> why? It seems absolutely ideal for when you want the entity's movement
> assertive over the environment, and it should be fairly easy to handle the
Because that wreaks havoc on the integrator/solver. You may (will) set position/orientation to illegal configurations, intersecting configurations, etc.
If you want to use forward kinematics, you want to drive joint angles with forces. These forces can be derived as fairly springs compared to an "ideal" walk cycle animation. As long as the walk cycle is well tuned, the skeleton will walk and not fall over. You probably want to run proximity queries so that your actor can slow down when getting close to object; else he'd walk into a box and fall over, still twicthing his legs. That would be Bad(tm) :-)
But, you can't do 20 of those on an 800 MHz CPU and still have anything left for the rest of your game. And trying to get all those joint angles in sync across a network is almost the definition of "not currently tractable" :-) Horses for courses.
Cheers,
/ h+
More information about the ODE
mailing list