mamairaja
12-10-2010 20:11:45
Hi
I am trying to implement a revolute joint for a door. But haven't succeeded yet.
This is my code.
Here I can see some kind of joint. But the gate rotates around the gate frame continously.
Could you please help me with this?
I am trying to implement a revolute joint for a door. But haven't succeeded yet.
This is my code.
NxOgre::Mesh* gateFrameMesh = NxOgre::MeshManager::getSingleton()->load("media:GateFrame.nxs");
NxOgre::Mesh* gateMesh = NxOgre::MeshManager::getSingleton()->load("media:Gate.nxs");
NxOgre::TriangleGeometry* gateFrameTg = new NxOgre::TriangleGeometry(gateFrameMesh);
NxOgre::TriangleGeometry* gateTg = new NxOgre::TriangleGeometry(gateMesh);
OGRE3DKinematicBody* gateFrameBody = mRenderSystem->createKinematicBody(gateFrameTg, NxOgre::Vec3(560,33,560), "GateFrame.mesh");
OGRE3DBody* gateBody = mRenderSystem->createBody(gateTg, NxOgre::Vec3(575,50,560), "Gate.mesh");
NxOgre::RevoluteJointDescription descr;
descr.mLocalAxis[1] = NxOgre::Vec3(0, 1, 0);
mScene->createRevoluteJoint(gateFrameBody, gateBody, descr);
Here I can see some kind of joint. But the gate rotates around the gate frame continously.
Could you please help me with this?