Oceax
25-07-2009 00:17:37
Im trying to get a car working like the exampel in the 1.5.5 blog thread
http://www.ogre3d.org/addonforums/viewtopic.php?f=6&t=10348&start=0&hilit=simulate
My code is exactly as in that thread with mass set, wakeup set, etc. mDriving is "true" for front wheels.
Graphics looks correct and i can steer the wheels but they dont rotate when the following function is called.
Any ideas what can be wrong?
http://www.ogre3d.org/addonforums/viewtopic.php?f=6&t=10348&start=0&hilit=simulate
My code is exactly as in that thread with mass set, wakeup set, etc. mDriving is "true" for front wheels.
Graphics looks correct and i can steer the wheels but they dont rotate when the following function is called.
void WheeledObject::drive(float torque)
{
for (unsigned int i=0;i < mWheels.size();i++)
if (mWheels[i].mDriving)
{
mWheels[i].mWheel->setMotorTorque(torque);
}
}
Any ideas what can be wrong?