whw
21-10-2008 08:23:23
My car modle is too big,so I want to scale it.the follow is my code:
carBody=mPhysiX->mNxScene->createBody("car", new NxOgre::Cube(2,2,3), carNode->getWorldPosition(), "model: F40plstc.mesh", "mass: 500,scale:0.01,0.01,0.01");
carBody->setRenderMode(RenderableSource::RM_Interpolate);
WheelParams wp;
wp.setToDefault();
wp.mLocalPose.t.set(0.756, -0.55, 1.319);
wp.mSuspension.spring = 12.5e3;
wp.mSuspension.damper = 1500;
wp.mSuspensionTravel = 0.3f;
// Create the wheels.
m_wheelSet= WheelSet::createFourWheelSet(0.45f, float3(0.756, -0.55, 1.319), float3(-0.756, -0.55, -1.076), carBody, wp, "model: F40whlC.mesh, mode: interpolate");
// Set the wheels as front wheel drive.
m_wheelSet->setAs(WheelSet::TL_Front);
// Never make the Actor go to sleep. (important)
carBody->wakeUp(1e10);
carBody->setSleepEnergyThreshold(0.0);
the result is that my car not scale any.My car now can move,only problem
is my modle two big.
I have try this,but still can't scale my car.
//car model load
Entity* car = mSceneMgr->createEntity("car", "F40plstc.mesh");
car->setMaterialName("Material_#493/F40plstc");
carNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("carNode");
carNode->setPosition(Vector3(707,200,528));
carNode->setScale(0.01,0.01,0.01);
carBody=mPhysiX->mNxScene->createBody("car", new NxOgre::Cube(2,2,3), carNode->getWorldPosition(), "model: F40plstc.mesh", "mass: 500,scale:0.01,0.01,0.01");
carBody->setRenderMode(RenderableSource::RM_Interpolate);
WheelParams wp;
wp.setToDefault();
wp.mLocalPose.t.set(0.756, -0.55, 1.319);
wp.mSuspension.spring = 12.5e3;
wp.mSuspension.damper = 1500;
wp.mSuspensionTravel = 0.3f;
// Create the wheels.
m_wheelSet= WheelSet::createFourWheelSet(0.45f, float3(0.756, -0.55, 1.319), float3(-0.756, -0.55, -1.076), carBody, wp, "model: F40whlC.mesh, mode: interpolate");
// Set the wheels as front wheel drive.
m_wheelSet->setAs(WheelSet::TL_Front);
// Never make the Actor go to sleep. (important)
carBody->wakeUp(1e10);
carBody->setSleepEnergyThreshold(0.0);
the result is that my car not scale any.My car now can move,only problem
is my modle two big.
I have try this,but still can't scale my car.
//car model load
Entity* car = mSceneMgr->createEntity("car", "F40plstc.mesh");
car->setMaterialName("Material_#493/F40plstc");
carNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("carNode");
carNode->setPosition(Vector3(707,200,528));
carNode->setScale(0.01,0.01,0.01);