Make Fake RPMs

How can I calculate RPMs which of course won’t be real of the rb velocity? I’m not using wheel colliders just addForce forward to the car. The velocity.magnitude tops out at 367, I wan’t my car mph to to out visually at 180, so I get that by mph = rb.velocity.magnitude / 2.03. Now I want to know when to shift gears but I don’t have any engine RPMs. Is there a way to use the velocity.magnitude or mph to get some sort of fake RPMs? This real world formula

rpm = MyRigid.angularVelocity.magnitude * 60f / (Mathf.PI*2f);

doesn’t work because my rigidbody is going way to fast so I really just need some sort of fake/cosmetic RPMs.

Actually if I do this

rpm = rb.velocity.magnitude * 60f * (Mathf.PI * 2f) / 13000f;

I get rpm from 1 - 10 then I can multiply rpms * 1000 to get a fake tachometer ranging
from 0 -10000 rpms. That works.

1 Like