- Home /
The question is answered, right answer was accepted
Making car shift gears without set speed limit
Hello! I'm creating a car script that follows a more realistic behaviors than the tutorials on the web. I already have the system working, calculating torque, rpm, etc... But now I'm stuck with shift gears
All tutorials that I found sets a speed limit to change the gears(if the car reaches 100 km/h, change gear), but it's so much artificial. I took a look on Project Cars and they change gear when the car reaches the maximum rpm for the gear. I tested it in my game and it's perfect, but now I'm trying to find a way to change the gear down. It's not when the rpm is the minimum possible, so what can I do? Any help is appreciated(some articles or books too!).
Thanks in advance (:
What's wrong with using a $$anonymous$$imum RP$$anonymous$$? I know cruising is typically 1-200 RP$$anonymous$$, but it should go down as the speed decreases in a high gear.
This is a good question, I implemented this(when rpm is at max, shift up, and when it's $$anonymous$$imum, shift down) but it just not feels good, speed decrease very slow and in other games(I know project cars because it's the one I have), they shift gears down on some RP$$anonymous$$ value, not the $$anonymous$$imum. I will try to make it decelerate faster now to see the results.
Edit: I just tested this method but it didn't work, I don't know if is my code wrong, but the RP$$anonymous$$ reach the $$anonymous$$imum just when the car is stopped.
Answer by FortisVenaliter · Oct 03, 2017 at 10:39 PM
What is the minimum value? Zero?
And maybe the problem is how the RPMs are handled. If I let my car roll to a stop in 6th gear, I drop my transmission, so it shouldn't allow a car to roll to a stop in high gear.
Yeah, I let it change the gear when RP$$anonymous$$ is half the maximum RP$$anonymous$$, and now I got a nice behavior. Thanks for help me!
Follow this Question
Related Questions
Drifting code not 100% accurate? 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
2d game platform physics 1 Answer