[ODE] Beginner's questions

Petr pjsoft at volny.cz
Sat Aug 20 01:07:50 MST 2005


Hi.

I'm new with ODE. In this time i create simple airplane game and for better
physics i choose ODE.
My first step is make roll of airplane, but i can't do it correct. I'm
trying to do it this way :

- create airplane's skeleton body and two wing bodies
- for both wings i use hinge joints (position 1,0,0 and -1,0,0 ... and axis
1,0,0 for both)

Before render i'm try to compute physics like :

dBodyID Skeleton = GetBodyType (ModelSkeleton);

dBodyID FrontLeftWing = GetBodyType (FrontLeftWing1);
dBodyID FrontRightWing = GetBodyType (FrontRightWing1);

// for test roll to the left
dBodyAddRelForce (FrontLeftWing, 0, -1, 0);
dBodyAddRelForce (FrontRightWing, 0, 1, 0);

dWorldStep (g_Physic->WorldID (), timeOffset);

if (Skeleton)
{
  Quaternion Q = ODEToQuaternion (dBodyGetQuaternion (Skeleton));
  QAngle A;
  QuaternionAngles (Q, A);
  pPlayerEntity->RotateTo (A.x, A.y, A.z);
}

But it doesn't works :-/. What i'm doin'g wrong ?

PS : sorry for my poor english :-)

Petr



More information about the ODE mailing list