[ODE] keyframe character animation link to a ragdoll
Samuel Girardin
samuel.girardin at wanadoo.fr
Mon Feb 16 03:53:15 MST 2004
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
More information about the ODE
mailing list