orangeduck / Corange

Pure C Game Engine
http://www.youtube.com/watch?v=482GxqTWXtA
Other
1.78k stars 199 forks source link

How does the interpolation work on the animation? #53

Open EmmanuelMess opened 4 years ago

EmmanuelMess commented 4 years ago

Here: https://github.com/orangeduck/Corange/blob/eaace0fcfdd895863e3f71f155a387dfb0e7130c/src/assets/animation.c#L70-L79

I don't understand why you do time = fmod(time, a->frame_time * (a->frame_count-1)); and then (time / a->frame_time) + 0 for the first frame.