Problem with Kinematic Body Translation

Spr

08-10-2009 13:29:37

Hello,

I am loading a scene using OgreMax, and then loading an another object separately and then trying to translate the object. This Object is a Kinematic body and I am translating it using moveGlobalPosition() function.

But I am having problems here, say for e.g. I translate the body in +x direction for a certain distance, and then translate it back in -x direction, with 0(Zero) translation in both y and z axes, the body is not moving in a straight line, i.e. if I keep moving it back and forth it keeps moving in almost a diagonal direction.

What could be the reason here? Any idea.

I would really appreciate any bit of help. I hope I have explained my problem clearly.

SPR

al2950

08-10-2009 14:13:56

I am doing something very similar to you. I move my kinematic actor with moveGlobalPosition() and i also move another Ogre object using sceneNode->translate() for a point of reference. My kinematic actors moves in the right direction and keeps perfectly inline with my Ogre only object although i do have quite a bit of jittering.

I am not sure how your kinematic actor could move in a diagonal! Assuming you have done something like OGRE3DKinematicBody->moveGlobalPosition(5,0,0).

What version of NxOgre are you using?

betajaen

08-10-2009 14:21:23

^^^^^^^^^^^^^^^^ What he said ^^^^^^^^^^^^^^^^^^^^^^

But perhaps your scene loaded from OgreMax isn't orientated correctly, so when it looks like it's going diagonal it is really going in the X+ direction.

Spr

08-10-2009 18:37:04

Thanks al2950 and Betajaen for your replies.

al2950 - " I am not sure how your kinematic actor could move in a diagonal! Assuming you have done something like OGRE3DKinematicBody->moveGlobalPosition(5,0,0)".

SPR
Yes that is what I do, OGRE3DKinematicBody->moveGlobalPosition(Vec3). And that's what I am unable to understand as to why the translation is diagonal.

Betajaen - " But perhaps your scene loaded from OgreMax isn't orientated correctly, so when it looks like it's going diagonal it is really going in the X+ direction".

SPR
Any suggestions on how I reorient the OgreMax Scene?

Spr

09-10-2009 08:01:53

I was able to get solve the translation issue, was some issue with the logic. Thanks for all the help

SPR