what's wrong with my revolutejoint?help!

hitwangxiaolu

28-10-2010 14:17:29

i'm using blodymess1.55 and OGRE1.7.x;
i created a fixedjoint and a revolutejoint;
fixedjoint:UbotP00 and UbotLink;
revolutejoint:UbotP10 and UbotLink.
when i disabled timegoing like this: //mTimeController->advance(evt.timeSinceLastFrame);
the three bodies just in the right place i want;picture1.
from top to bottom:UbotP10,UbotLink,UbotP00 .
[attachment=2]screenshot_1.png[/attachment]
when time goes,fixedjoint is good,but the revoutejoint seems to be wrong,picture2-3;
problem:UbotP10 isn't in the right place,and shaked littlely on and on,but i didn't apply
[attachment=1]screenshot_1.png[/attachment]
[attachment=0]screenshot_3.png[/attachment]

any force and motor .
so what's the key?
plz,i just can't resolve it.

sb.'s code below :
//mScene = mWorld->createScene("Main",mSceneMgr); // Joints separate too much

Joints separate too much,is it the point?
he did like this:
nxOgre::blueprint<nxOgre::scene> blueprint;
blueprint.toDefault();
blueprint.mTimeStepMethod = NX_TIMESTEP_FIXED;
blueprint.mMaxTimestep = 1.0f/180.0f;
mScene = blueprint.create("Main",mSceneMgr);
he used nxogre 0.4.

my code as follows;
NxOgre::RevoluteJointDescription revJointDesc1;


revJointDesc1.mLocalAnchor[0]=NxOgre::Vec3(0,0,0);
revJointDesc1.mLocalAnchor[1]=NxOgre::Vec3(0,0,0);
revJointDesc1.mLocalAxis[0]=NxOgre::Vec3(0,1,0);
revJointDesc1.mLocalAxis[1]=NxOgre::Vec3(0,1,0);
revJointDesc1.mProjectionMode =NxOgre::Enums::JointProjectionMode_None ;
NxOgre::RevoluteJoint *revJoint1=mScene->createRevoluteJoint(mUbotLink,mUbotP10,revJointDesc1);



NxOgre::FixedJointDescription revJointDesc2;
revJointDesc2.mLocalAnchor[0]=NxOgre::Vec3(0,0,0);
revJointDesc2.mLocalAnchor[1]=NxOgre::Vec3(0,0,0);
revJointDesc2.mLocalAxis[0]=NxOgre::Vec3(0,1,0);
revJointDesc2.mLocalAxis[1]=NxOgre::Vec3(0,1,0);

NxOgre::FixedJoint*revJoint2=mScene->createFixedJoint(mUbotP00,mUbotLink,revJointDesc2);

hitwangxiaolu

29-10-2010 03:12:14

i'm so sorry to bump an old post.
so i post the question in reply;
an old post asked a question like mine:
How to create a joint in which two actor "tightly" connected with each other, but I can control one actor to rotate to change its direction

yeah, the revolutejoint isn't "tightly" connected .it is the problem i can't figure it out.

sorry,my native language isn't English;mybe i didn't say clearly.

back to the problem:revolutejoint linked two bodies ,but when time goes ,a body is affected by something like gravity so that revolutejoint don't maintain the ideal type!
is the revolutejoint so fragile?