Re: [ODE] I´m totally unhappy with ODE ... Please Help me
arturapps at gmail.com
Sun Dec 17 05:51:24 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 .
I ´m doing rotations by computing the rotation matrix from Euller angles and
than using dGeomSetRotation .
I also noticed that dGeomSetRotation by matrix is very slow for complex
That is the function I use to compute the matrix :
bool CollisionSystem::ComputeRotMatrix(double rotX, double rotY, double
rotZ, dMatrix3 & matrx)
/* Euller */
alfa = rotY;
beta = rotZ;
gama = rotX;
matrx = cos(beta)*cos(gama);
matrx = sin(alfa)*sin(beta)*cos(gama) + cos(alfa)*sin(gama);
matrx = - cos(alfa)*sin(beta)*cos(gama) + sin(alfa)*sin(gama) ;
matrx = - cos(beta)*sin(gama);
matrx = - sin(alfa)*sin(beta)*sin(gama) + cos(alfa)*cos(gama);
matrx = cos(alfa)*sin(beta)*sin(gama) + sin(alfa)*cos(gama);
matrx = sin(beta);
matrx = -sin(alfa)*cos(beta);
matrx = cos(alfa)*cos(beta);
Lode Vanacken wrote:
> I just recently replaced our collision engine with ODE as a first step to
> move towards physics integration. I am also using GIMPACT and I don't
> have any problems at all.
> For drawing, what are you drawing? Are you using the ODE geoms or you
> own structure? I would
> suggest to draw both, this way you can see if they are aligned or not. I
> had problems with my vertex stride
> and so on, I know you have tested it in an example, but to make sure and
> as you are rather desperate I would
> try this. Some example code for drawing to get you started:
>> for(int j = 0; j < dGeomTriMeshGetTriangleCount(geomObj); j++)
>> dVector3 p1, p2, p3;
>> dGeomTriMeshGetTriangle( geomObj, j, &p1, &p2, &p3 );
>> //DrawTriangle Code
> arturapps wrote:
>>I´m working on a game that doesn´t need Real time physics but needs
>>Trimesh-Trimesh colision Detection .
>>The game is a kind of spaceship race that takes place on a quite large
>>enviromment composed of trimeshes.
>>I´m experiencing all kind of problems with my collisions : Since false
>>collisions , until missed collisions. Sometimes the near callback is not
>>triggered even if two trimeshes visually collide.
>>I examined ODE´s documentation and figured out that it´s possible to use
>>just the colision detection capabilitys of ODE. So my sojtware does not
>>create the "word" and any body for physics processing. The ODE´s
>>of simulation is not called. The software just create the colision space
>>and associate geoms ( trimeshes ) to the game entitys .
>>That´s the way the game works:
>>Create collision space
>>Create Entytys and associated geoms ( trimeshes)
>>Call Entity´s IA // Each entity decide about its next movement and then
>>modify it´s position and orientation
>>modify entity´s geoms // based on entity´s position and orientation
>>call colision detection (dSpaceCollide)
>> call dcollide to get contact points between the colision pair
>>iinform the entitys associated with the colision geoms , about the
>>//In the next loop the Entity´s IA will do something as colision response
>>Well ... first of all , I´d like to know if is that aproach correct. IS
>>there any problem using just colilision detection system of ode ?
>>By the way : I´m using the version of ODE , that uses GIMPACT instead of
>>OPCODE. I downloaded this version at :
>>In second place : I´d like to describe some tests I made to be sure that
>>trimeshes and trimesh creation process are correct:
>>I changed the test_moving_trimesh example that comes with the
>>project, in order to create the trimeshes from my model file format ,
>>instead of creating the "bunnys" on the code. I didn´t changed the way it
>>does trimesh creation because it was the same way I do it . So I could
>>notice that my trimesh models work very well . they are displayed
>>and collyde very well. So I discarded problems about vertex order or
>>In my software I don´t call dGeomTriMeshSetLastTransform in order to
>>temporal coerence for the Geoms.
>>I removed all calls of dGeomTriMeshSetLastTransform from the
>>test_moving_trimesh example and than I noticed that it does not afect
>>colisions , but only the quality of physics simulation.
>>So I don´t know what I can do next in order to understand my problem ?
>>Help me please !!!
> ODE mailing list
> ODE at q12.org
View this message in context: http://www.nabble.com/Im-totally-unhappy-with-ODE-...-Please-Help-me-tf2829364.html#a7915632
Sent from the ODE mailing list archive at Nabble.com.
More information about the ODE