[SOLVED] Rotations dont seem to be exactly right!!

al2950

02-10-2009 19:11:01

I am still trying to reproduce the results from the simple PhysX rope demo in NxOgre and i am nearly there but i have run into one more problem;

When the rope coils each segment does not line up. I have checked it in the remote debugger and it looks perfect but in Ogre all the segments (which are just cylinders) are out of line by a few degrees. I have double and triple checked the center of mass and the center point of the cylinder mesh are in the middle, but i can not get the segments to line up as they do in the Remote debugger?

Has anyone got any ideas why this might be happening, any ideas would appreciated as i am at a loss here!!

Cheers

Gus

betajaen

02-10-2009 20:02:59

It may be a quaternion problem.

Any chance you can compare the quaternion in the Remote Debugger (or accessing the getNxActor()->getGlobalOrientationQuat()) and comparing it to the NxOgre Quaternion?

al2950

03-10-2009 11:39:22

Yeah i have a look at that, away from my dev machine for the weekend so i will have a look next week.

al2950

05-10-2009 10:40:56

I have compared the rotation of the scene node and the NxActor. They are correct BUT only up to about 5 decimal places. After about 5 decimal places some errors seem to creep in. My Quaternion knowledge is very poor! But i dont think this error would be enough to cause the visible problem i am seeing???

al2950

08-10-2009 10:35:57

Problem: The point of rotation of the capsule was not at the center of mass, nor was it at the top of the capsule where the joint is.

Solution: Move the center point of my mesh to the bottom!

Question: Why is the point of rotation at the bottom of the capsule, and how do you change it???