# SmothStop Function doesn't work as expected

i'm trying to create a smothstop function i need it to control time variable on my lerp function used to move character and so on...what i have is this

    private float SmothStop(float t)
{
return  1 - (1 - t * t * t * t * t);

}


problem here is that will start slow then accelerate... same as smothstart function.. that i already tested and work on that way.. so.. what i'm missing up?

Look what happens when we multiply through the parentheses here:

  1 - (1 - t * t * t * t * t)
= 1 - 1 + t * t * t * t * t
= t * t * t * t * t


So you just re-wrote SmoothStart in disguise.

It looks like what you want is:

float s = 1f - t;

return 1 - s * s * s * s * s;


When t is close to 1, s is close to zero. Raising to the 5th power creates a shallow slope around s = 0 (t = 1), and a steep slope around s = 1 (t = 0). Subtracting from 1 ensures the function is still increasing from 0 to 1 as t increases from 0 to 1.

• Thank’s uou really so much! I got the pont! Commented Jun 30, 2019 at 3:20