[ODE] strange dGeomSetRotation problem
kxxl at poczta.onet.pl
Mon Jul 23 00:22:31 MST 2007
>> when I set rotation using matrix:
>> [ 0.0 0.0 1.0 ]
>> [ 0.0 -1.0 -0.0 ]
>> [ 1.0 0.0 -0.0 ]
>> then I get that matrix from geom and this is what i get:
>> [ 1.0 0.0 0.0 ]
>> [ -0.0 1.0 0.0 ]
>> [ 0.0 -0.0 1.0 ]
> Please post the code you are using to set and get the rotation matrix.
> And which ODE version you are using.
There is too much code to present, so I will show basic idea. I move
animation for skeleton to my ragdoll (but when driven ragdoll from animation
it do not have joints between bodies!). Update look something like that:
//move info from skeleton to ODE
//getting and counting pos, vX,vY,vZ,avX,avY,avZ
//from skeleton for bone
dGeomSetPosition(bone.symModel, pos, pos, pos );
//check part, I get all bone and show them as boxes to see if all data
are set ok
const dReal* bonePos;
const dReal* R;
bonePos = dGeomGetPosition(bone.symModel);
R = dGeomGetRotation(bone.symModel);
//set this to corresponding box
//process physics engine to move objects that are not driven by
I use ODE 0.8, and when I was writting this I see that there are 3 potential
places, where data can be corrupt:
1) when I set data to ODE geoms
2) when I get data from ODE geoms
3) when I set data to show boxes in engine
is it possible that ODE corrupt this?
I would like to assure, that everything works ok, except some cases, like
this presented in first post. As a result of this corruption few frames of
all animation have "bone jumps".
> Daniel K. O.
More information about the ODE