Log In  

Cart [#58411#] | Code | 2018-10-25 | License: CC4-BY-NC-SA | Embed
5

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!

P#58412 2018-10-25 13:02 ( Edited 2018-10-26 10:30)

nice!

P#58423 2018-10-25 17:17 ( Edited 2018-10-25 21:17)

I've uploaded a YouTube video with a tutorial for using these functions.

https://www.youtube.com/watch?v=cZ-KDR8i4LY

P#58443 2018-10-26 06:30 ( Edited 2018-10-26 10:30)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-07-18 12:06 | 0.015s | 4194k | Q:26