moagames
19-03-2008 20:45:16
I know, this has been asked several times before, but i haven't found any suitable answere for me.
First, this is my code for creating a vehicle:
Everything compiles fine, but when i run it, it crashes down after nearly a second.
when i remove the two lines for the motor, everything works fine.
So anyone has a suggestion plz ?
First, this is my code for creating a vehicle:
Body* mVehicleChassis = m_pPhysicsScene->createBody("car; cube.1m.mesh", new CubeShape(2,1,4), Vector3(5,3,5), "mass: 1000");
mVehicleChassis->getNode()->scale(Vector3(2,1,4));
WheelSet m_WheelSet = WheelSet::createFourWheelSet(mVehicleChassis, Vector3(-1.1f, -0.1f, 2.0f), Vector3(1.1f,-0.1f,-2.0f), 0.5);
m_WheelSet.addMeshes("sphere.50cm.mesh");
m_pMotor=new Motor("Motor", m_pPhysicsScene, &m_WheelSet.mWheels);
m_WheelSet.attachDriveShaft(m_pMotor);
Everything compiles fine, but when i run it, it crashes down after nearly a second.
when i remove the two lines for the motor, everything works fine.
So anyone has a suggestion plz ?