Shifting in a car

hi! i am making a rally game and it would be great to have some sort of shifting mechanic.
i know i can use an RPM value but i just don’t know how to set it up (if it has something to do with the rigidbody or the wheelcolliders)
or should i script an entirely virtual car engine to keep track of rpm? (it would be alot of work but probably worth it in the end since tuning and stuff)

and then what?

if you think about a real gearbox when you shift up the required force to move goes up since the gear ratio changes, so should i when shifting up turn down the wheel colliders torque and higher the top speed?
How do i even set a top speed?
Do i lower the mass of the car, because then it goes faster but of course thats completely unrealistic doing it that way.

Under info my rigidbody does have a magnitude/value for speed but i cant seem to be able to acces that in a script, so how do i do that?

this is probably one of the most important steps of the game so far because if i just get an RPM value i could write alot of things based off of that.

any kind of help would be appreceated.
thanks in advance…

You probably want to play with curves like that one

1 Like