[ODE] very difficult problem

gbaudio@hushmail.com gbaudio at hushmail.com
Tue Feb 26 04:15:02 2002


Hello all,
A little background information - my name's Dave, I'm currently working on a small game project, and I'm making use of the ODE libraries.
As it's a game, please bear in mind that my use may be slightly unusual, and certainly accuracy is not the most important issue.

I have an object (ODE body) which is subject to very specific constaints. It is limited to the xy plane, and further, rotation is permitted only about the z axis. This is primarily achieved via the fact that all ODE objects are aligned on the z axis, and a modified callback routine which eliminates the z comoponent of impulsive forces whilst ensuring their point of contact lies on the xy plane. The object moves around subject to interaction with scenery (also ODE objects), and forces which are applied depending on user key presses.

So far so good. However, for animation purposes, I would like the object to rotate about the y-axis and face the other way whilst moving left. Unfortunately, if I spin the object in this direction, I find it difficult to exert the required torque for a start, but further, the whole symmetry which maintains objects in the xy plane is disturbed.

Therefore, I decided that I would rotate the *displayed* object instead. For example, imagine that the object in question is a stick figure, represented by ODE both physically and geometrically as a cube. At render time, I grab the stick model, and rotate and translate based on ODE's representation of a cube. To facilitate the required animation, I rotate the mesh of the stick figure before the other transformations. This all works ok too.

The problem, which I am at last getting to, is when I have a jointed figure, composed of several ODE bodies. In animation terms, I can rotate everything, but the position of joints and hinges should essentially rotate too - which of course it does not when I am simply rotating the meshes. Technically speaking, I should rotate the entire ODE assemble, but this, as mentioned early, removes the essential symmetry about the xy plane - unless, somehow, it is possible to realign the object on this plane and with the reqiured orientation afterwards.

Ok, I've just reread this and it makes very little sense. I also suspect it to be a problem with no good solution, but I thought I'd mail it all to the list anyway on the offchance that not only can someone understand this awkward explanation, but also supply some good advice. I suspect that what I'm attempting is not possible, and I am unfortunately going to have to drop my plans for jointed models if I want to animate them to face both right and left.

All comments welcome.

Regards,
Dave

Hush provide the worlds most secure, easy to use online applications - which solution is right for you?
HushMail Secure Email http://www.hushmail.com/
HushDrive Secure Online Storage http://www.hushmail.com/hushdrive/
Hush Business - security for your Business http://www.hush.com/
Hush Enterprise - Secure Solutions for your Enterprise http://www.hush.com/