Jump to content
  • Advertisement
Sign in to follow this  
adriansnetlis

Car throttle management with keyboard

This topic is 986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!