This is a selection of easing functions to make the movement of objects more pleasing to the eye.
Simple call the function (I have included separate functions to save space) and pass four variables:
t = how far through the current movement you are
d = the total duration of the movement
b = where the movement starts
c = the final change in value at the end.
For example, if you want an object to move from y = 20 to y = 100 in 30 update loops you would set:
t = the count, starting at 0 and ending at 30
d = 30
b = 20
c = 80
You can get some great effects and it really helps make movement that little bit more realistic.
Have fun and let me know if it's useful!
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](https://www.lexaloffle.com/bbs/files/26940/icon1.png)
I've uploaded a YouTube video with a tutorial for using these functions.
[Please log in to post a comment]