AnimationTrack:Play(function easingFunction)

easingFunction is a function that is given a number from 0 to 1. This number represents how long the animation has been playing as a fraction of its total length. 0 would mean the animation just started and 1 would mean it’s finished. The easingFunction then returns a value representing where the animation should be at that time. 0 is the start of the anim, 1 is the end, .5 is the middle, .25 is a quarter of the way in, etc. If you can support extrapolation, the value need not be between 0 and 1.

Easing function examples: http://easings.net/

This would give us a lot more freedom than having enumerated easing styles.

Pitched it and it was denied. Lua overhead is just too much to run efficient animations, I wad told.

As an intern, for context, I pitched it.

1 Like

Some built in easing functions are coming.

We couldn’t do the lua based ones as the overhead to call out to Lua for every animation for every frame was high.

2 Likes

Curses, foiled by Lua again!

This shouldn’t be true, I’m testing Lua animations here: Animation Testing - Roblox.
The number at the bottom left is how many milliseconds it takes to animate and cframe all of the characters in Lua per-frame. Clicking the number will reset the average.
It will do some throttling on characters that are off screen or far away to keep up performance on slower machines.

There are also lots of trees animating and the map is streamed in lua so it’s not a perfect benchmark. I also haven’t reimplemented NPC’s after redoing the network code.

I think the problem with this request is network-related, but I don’t have much experience with the default system.