Problem with mMassLocalPose

seidan

13-04-2010 02:03:29

hi

i try to do a race game but i have a little problem with center of mass because if i do this


NxOgre::RigidBodyDescription description;

description.mMass = 1750;
description.mWakeUpCounter = 1E8;
description.mMassLocalPose = NxOgre::Vec3(0,-1.5,0);

NxOgre::ResourceSystem::getSingleton()->openArchive("media", "file:media");
NxOgre::Mesh* convexMesh = NxOgre::MeshManager::getSingleton()->load("media:carro.nxs");

NxOgre::Shapes shapes;
mChassisShape = new NxOgre::Convex(convexMesh);
mChassisShape->setMass(1000.0f);
shapes.insert(mChassisShape);

addWheel(NxOgre::Vec3(-2.6,-1,3.6), false, false, true);
addWheel(NxOgre::Vec3(2.6,-1,3.6), false, false, true);
addWheel(NxOgre::Vec3(-2.6,-1,-5), true, true, true);
addWheel(NxOgre::Vec3(2.6,-1,-5), true, true, true);

for (unsigned int i=0;i < mWheels.size();i++)
shapes.insert(mWheels[i].mWheel);

mActor = mScene->createActor(shapes, position, description);
mPointRenderable = mRenderSystem->createPointRenderable("jeepBody.mesh");


nothing happen is the same if i dont put that, i have to add a big force at car but i think that is wrong

the car handle when steering maneuvers


sorry for my bad english

seidan

28-04-2010 01:44:26

i find that if i put mass in -0.5 or -50 or 100 the carro->mActor->getCMassLocalPosition().y is the same always i don“t know why

please help

seidan

28-04-2010 17:43:18

Problem solved