[ODE] keyframe character animation link to a ragdoll

Jon Watte hplus-ode at mindcontrol.org
Mon Feb 16 08:29:57 MST 2004


Did you call dClearForcesAndTorque() on each object when you switched between modes? Do you call dSetQuaternion() and dSetPosition() on each object to make it match up the keyframe animation, when you switch from keyframe to ragdoll? (sounds like you did the second, but I'm not sure)

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Samuel Girardin
Sent: Sunday, February 15, 2004 6:53 PM
To: ode at q12.org
Subject: [ODE] keyframe character animation link to a ragdoll


Hello ,

I've a problem... I'm working on characters animations & behaviors.

On one side I have a skinned mesh link to a bones skeleton animated
by keyframe (3dsmax export).

On the other side I have an ODE skeleton generated with the bones'mesh
parameters(lenght, position ,rotation, etc.).

For the moment, I'm able to play the loop keyframe animation (simple walk),
and when I hit a key  I  switch to the ragdoll mode. My character fall down
correctly. The transition between  the first  state  to the second is ok...

Here is the pseudo code I use to deal with the two state

if (a key is hit)
 (
 enable ode simulation
 update bones mesh matrix with the ode skeleton matrix
) else
 (
enable loop keyframe animation
update odeskeleton matrix with the mesh bones matrix
)

That works only well only one time:
Character walk, I press the key, the character fall, I release the key to
switch
to keyframe animation, character walk again, but if I press the key again it
seems
ode keep somewhere the last ragdoll state (position etc...). It's not
exactly the
last ragdoll state,  it depends...

So I think  my update for ode skeleton   with the bones mesh works only  the
first time. If I let my character walk during 1km and I hit a key to switch
to
ragdoll mode, that's work, but  not the second time.

To update ode skeleton I use  :
body[].setPosition  &  body[].setRotation. I think those changes are not
update
by ode. So is there a way to update body pos & rot without compute
simulation ?
Like said to ode  : keep for each new frame those changes somewhere in
memory ,
you need those value  when you 'll have to do your job ?

Here it is. So if someone understand my problem. I appreciate any help !

samuel

www.aaxyz.com

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list