Re: [ODE] I´m totally unhappy with ODE ... Please Help me
David Walters
hidden.asbestos at googlemail.com
Mon Dec 18 05:06:20 MST 2006
> I´ve just discovered that my problems are the rotations I apply to my geoms.
> I have no problem with translations but just with rotations .
Hi, a common problem is that the orientation(?) of the ODE matrix is
different from DirectX / OpenGL. There's probably something in the
Wiki about it, I forget :-)
Anyway, try transposing the rotation, i.e.
dMatrix3 R;
R[ 0] = transform.m00;
R[ 4] = transform.m01;
R[ 8] = transform.m02;
R[ 1] = transform.m10;
R[ 5] = transform.m11;
R[ 9] = transform.m12;
R[ 2] = transform.m20;
R[ 6] = transform.m21;
R[10] = transform.m22;
R[ 3] = 0;
R[ 7] = 0;
R[11] = 0;
dGeomSetPosition( m_geom, transform.m30, transform.m31, transform.m32 );
dGeomSetRotation( m_geom, R );
This is copied from my (DirectX based) engine and should hopefully
solve your difference between rendering and collision.
Regards,
David Walters
More information about the ODE
mailing list