I am encountering an issue, which is easily reproducible with the vehicle demo.
Simply apply brake to each of the 4 wheels (instead of applying them to the rear wheels only), so simply add these two lines in VehicleDemo.cpp, in clientMoveAndDisplay():
Code: Select all
m_vehicle->setBrake(gBreakingForce,0);
m_vehicle->setBrake(gBreakingForce,1);
Now simply press the up arrow key (accelerate) for a few second, then release the key, then press the down arrow key (brake) until the vehicle stops. You will see the vibration effect quite noticeably.
[*]first question: am I supposed to apply braking to two wheels only ?
[*]second question: I guess the issue comes from the calcRollingFriction() function, which returns a non-zero friction, which oscilates each frame. Any idea how I can fix this ?
Thanks,
Greg