byte_wrench
13-06-2007 22:25:25
If anyone could tell me what I am missing, that would be appreciated..
Trying to figure out how to get a controllable paddle with its joint axis at one end and with stop limits in either direction..
NxRevoluteJointDesc jointDesc;
jointDesc.actor[0] = myCube->mActor;
jointDesc.actor[1] = myOtherCube->mActor;
jointDesc.setGlobalAnchor(NxVec3(0.5,4,0));
jointDesc.setGlobalAxis(NxVec3(0,-1,0));
jointDesc.flags |= NX_RJF_MOTOR_ENABLED;
jointDesc.flags |= NX_RJF_LIMIT_ENABLED;
jointDesc.limit.high.value = 120;
jointDesc.limit.high.restitution = 1;
jointDesc.limit.low.value = -120;
jointDesc.limit.low.restitution = 1;
NxMotorDesc motorDesc;
motorDesc.velTarget = 100;
motorDesc.maxForce = 100;
motorDesc.freeSpin = false;
jointDesc.motor = motorDesc;
mScene->mScene->createJoint(jointDesc);
Trying to figure out how to get a controllable paddle with its joint axis at one end and with stop limits in either direction..