Need some mathematical help here

Let’s say I have a vehicle, and I can calculate its RPM.

Let’s also say that I have a tachometer image in UMG with a needle. For this needle, when its RENDERING COMPNENT’S ANGLE PROPERTY rotates -145 degrees, that means the RPM was 0. When it’s 145 degrees, that means the RPM was 8000

I need to set the tachometer needle based off my RPM.
Is there a mathematical blueprint function that can help me relate 0-8000 RPM and -145-145 respectivley?

I was thinking about using a lerp, but the alpha can only be set from 0-1… so I am stumped here

Yes.

And its exact name slips me right now.

Clamp float in range i think…

gonna look it up now

Lerp it.

Put the 0-1 into the Alpha pin and the A/B are your angles.

Oh I misunderstood. You want the Alpha pin to have CurrentRPM/MaxRPM plugged-in. So I guess for you, CurrentRPM / 8000.

Here ya go … been Awhile since i used it so i had to look it up.

Hope this helps.

Neato. I’ll have to remember that one.