I'm not that good at math, and I am also tired.
So I would need some help with a formula for a clutch in my car physics project.
so I have a variable called clutch.
clutch is = 1 when it's fully released, and 0 when it is fully pressed down.
I also got a variabel called RPM, and it is exactly what you think it is.
I also want to use two variabels that we can call clutchMinRpm and clutchMaxRpm.
clutchMinRpm could be for example 1000, and that means that the clutch should be 1 when rpm, is = 1000.
clutchMaxRpm could be for example 2500, and that means that the clutch should be 0 when rpm is = 2500.
So I need to calculate what the clutch value should be between clutchMinRpm and clutchMaxRpm. Also, I don't want the clutch to decrease any further when it reaches 0, also not increase when it reaches 1.
I don't know if my explaining makes any sense, but basicly do I want the variable clutch to decreas liniar from 1 to 0 when the rpm increases from 1000 to 2500.
Edited by jar913, 14 December 2011 - 12:58 AM.











