[ODE] detecing sliding wheels?
Bram Stolk
bram at sara.nl
Sat Jun 3 01:46:10 MST 2006
Hello...
I'm trying to solve the following problem:
I have my car controls like "project gotham racing" where by the
left shoulder buttons acts as brake. However, when stationary,
if you press this brake, the car goes into reverse gear.
So it has two purposes: selecting rev gear, and braking.
Now, ofcourse I do not want the car to go into reverse when it
is still braking hard and slowing down. Only after it has stopped,
the controls should consider going into reverse.
A naive implementation I have now, is to check the linear velocity
of the car body. If this approaches 0.0, then rightshoulder button acts
as reverse gear.
This does not work when your car is on a moving platform, e.g. when
it is standing still on a moving 18-wheeler truck. In this case,
the system will never let me switch into reverse. So I need this
test to be relative to the underground.
I was thinking: If I could determine a sliding contact between
wheel and underground, I could make my test like this:
"If angular velocity wheel == 0.0 and no sliding contact then enable rev gear"
Would this work? Is there an ODE API call to detect a sliding contact?
What would be the best approach for this?
thanks,
Bram
More information about the ODE
mailing list