I’ve always been late when it comes to giving up old methods. I dismissed the animation editor when it first came out because I had been making procedural CFrame animations in scripts using welds, and at the time, I didn’t feel that the animation editor had the tools to make the types of dynamic motions I wanted.
I’m now trying the animation editor again and I really want to use it. However I don’t want to be restricted to Roblox’s built-in functions for interpolating between the frames. I want to be able to implement my own easing methods and have control over the interpolation per-frame.
Is there a way for me to simply take two keyframes and select a position between them, linearly? Using a percentage or a number between 0 and 1 like in CFrame:lerp and Vector3:lerp? So that I don’t have to deal with all this async stuff?
If this has already been answered or there’s documentation for this somewhere then I’m sorry, I tried searching the wiki and other devforum posts for the answer, but I couldn’t find what I was looking for.
These are Roblox’s implementations of several easing methods, using their tweening functions. They are asynchronous and can be started and stopped, but you have no granular control over the interpolation.
I’m looking for something like this (simple/metaphorical example):
pose1:lerp(pose2, 0.5)
No animation, just setting a specific position between two keyframes. Classic linear interpolation without it playing an animation in another thread for me or tweening.
I don’t believe you can actually do this. If you can, it will most likely involve you needing to create all parts of an animation manually (KeyframeSequence objects, Keyframes and setting positions on those keyframes), which sounds relatively tedious over using the options and such that are given to you in the animation plugin.
Moon Animation Suite has custom easing functions besides the ones Roblox gives you, but I believe a colossal amount of keyframes are created to ensure the easing is preserved upon exporting. Lerp is not available though. You can use this plugin, create a quick animation and explore the export to see how MAS creates keyframes for the custom easing styles.
Thanks. It’s a shame they don’t offer what I would personally consider the most basic possible functionality for the animation editor. There has to be an interpolation function built into the animation system somewhere being used internally, why can’t they just let us use it?
In the meantime I’ll continue doing animations with welds and CFrame:lerp.
I actually think this is possible. If you really want to, you can open the source code of the animation editor plugin, and do literally whatever you want to it. You could either edit the UI and implement your own ways of lerping, or hard code it if you’re only doing it once.
Is this really possible? I never looked, but I’ve always assumed the Animation assets were made of some incomprehensible data that only the engine can understand and provide functions for. But I guess that wouldn’t make sense considering a Lua plugin has to save them.
Edit: And considering the seeking feature in the animation editor is basically doing what I need.
It should be. Since it is a plugin, you should be able to find the lua source code for it in your plugins folder.
Edit: I know it’s possible, since people have spin-offs of the roblox animation editor.
I can’t load up Studio right now, but I’ll consider this the solution because I’m pretty sure I’ll end up finding what I need in the plugin code. Thanks.
It turns out what I wanted isn’t possible. Setting the interpolated distance between two keyframes is possible enough, but there’s something I overlooked.
I need to be able to animate from any position. For example I cherish the ability to stop interpolating halfway, then start animating to a new position from the stopped position. Or to animate to a keyframe smoothly no matter what crazy motion the character was doing before the animation started.
When doing animations manually, the only thing needed for this type of dynamic motion is a table of offsets/rotations representing the target pose, and a function that calls CFrame:lerp on all of the joints every frame. The starting position can be substituted with anything instantly.
Roblox’s animations are just tracks and this same behavior doesn’t seem possible with them. The closest thing I found to generating animations dynamically was this:
But it’s designed for testing and only works in Studio. Go figure.
I love all the features of the animation editor, and I would absolutely love it if we had a plugin that could build keyframes/poses the same way while still allowing us to interpolate freely.