maroxe
06-09-2008 23:55:46
Hi,
i'm trying to make a basic racing game, but i do't know wich joint is more convinient for a car wheel since ther's not D6joint .
I tried that, but apprently, it doesn't work:
i'm trying to make a basic racing game, but i do't know wich joint is more convinient for a car wheel since ther's not D6joint .
I tried that, but apprently, it doesn't work:
//create car body
car = new Body(CarMeshFileName, scene, new Cube(2, 2, 2) , NxOgre::Pose(Vector3(0, 0, 0)), CarParams);
//car rotates only around Y Axis
car->raiseBodyFlag(NX_BF_FROZEN_ROT_X);
car->raiseBodyFlag(NX_BF_FROZEN_ROT_Z);
//create wheel body
wheel = new Body(WheelMeshFileName, scene, new Wheel(0.4, WheelParams()), NxOgre::Pose(Vector3(2, 0, 2)), WheelParams);
//joint betwen the car and the first wheel
RevoluteJoint *joint = scene->createRevoluteJoint(this, wheel, Vector3::UNIT_X, wheel->getGlobalPositionAsOgreVector3());