Car throttle management with keyboard

Started by
0 comments, last by jjimenezg93 8 years, 1 month ago

I am just thinking on how would I manage car throttle for keyboard controllers. If the throttle is just 0.0 or 1.0, the car won't go well. I want to know the best way to manage the throttle system of car for digital inputs.

What ideas do you have?

Advertisement
I would use an acceleration variable, which can be a fix rate or even different for each car, depending on how is your game.

Having this acceleration, you can increase car's speed over time, and it will reach this 1.0 after some time holding the keyboard key.

You could even do it a bit more sophisticated and use another variable to increade acceleration, and not directly speed.

Best regards.

This topic is closed to new replies.

Advertisement