Custom Movement curves

I want to have a custom speed up and slow down curve.
Meaning i want to change the time it takes for the character to hit max speed and change the time it takes for the player to come to a full stop.

Is there a good way to do this?

You can use linear interpolation with alphas to achieve the thing you want

https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/a-brief-introduction-to-lerp-r4954/

1 Like

Yep like @gato_todomenso said you can lerp the movement vector of the humanoid to make it accelerate and deaccelerate slower using Vector3:Lerp() which is linear interpolation but for vectors (three numbers being lerped) like the below code.

2 Likes

Hey i was using the Control script in the link you posted and im getting this bug…
image
its caused by this line of code.
image
Iv tried a bunch of things and i cant get it to run correctly
do you know the problem?

EDIT: Fixed! i should have waited before asking more questions :stuck_out_tongue: thanks for the help!