Log In  

Cart #58411 | 2018-10-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
18

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)
2

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]

Follow Lexaloffle:          
Generated 2024-03-29 04:57:20 | 0.011s | Q:18