tuxbook
23-04-2008 07:08:43
I'm using 0.9 and I've created a vehicle with the following code:
The truck mesh loads and appears to be on invisible wheels. The tire mesh is not visible anywhere.
Doing:
Works fine and loads the mesh.
Any idea why the tire mesh isn't loading for the vehicle?
mTruck = mScene->createBody("mytruck;truck.mesh",new CubeShape(3,2,4),Vector3(0,2,0), "mass: 1500");
mTruck->setCMassOffsetLocalPosition(Vector3(0,-1,0));
mTruckWS = new WheelSet;
mTruckWS->createFourWheelSet(mTruck, Vector3(-1.5f,-0.4f,2), Vector3(1.5f,-0.4f,-2), 1.0f);
mMotor = new Motor("Motor", mScene, &mTruckWS->Drive);
mTruckWS->attachDriveShaft(mMotor);
mTruckWS->addMeshes("tire.mesh");
The truck mesh loads and appears to be on invisible wheels. The tire mesh is not visible anywhere.
Doing:
mScene->createBody("tire;tire.mesh", new CubeShape(1,1,1), Vector3(0,20,0), "mass: 1");
Works fine and loads the mesh.
Any idea why the tire mesh isn't loading for the vehicle?