Wow, I can beleiver I cant figure this out, But pretty much heres what I want to do, I want to be able to push an object base on its distance from another object, using some key variables
float DISTANCE_FULL_PULL=5;
float DISTANCE_ZERO_PULL=4;
So pretty much, if Distance is 4 or less, the push is 0.0
if distance is >=5, then the push is 1.0
The main problem im having is the inbetween part, I know its pretty simple its just a 2d line(Pretty much)
m=rise/run
Y=mx+b
m=1/DISTANCE_FULL_PULL-DISTANCE_ZERO_PULL
Push=(m*distance)+DISTANCE_ZERO_PULL
is that correct? I dont have any real way of testing it, but it seems to work