Transition between swing/idle animations smoothly?

Hell-AYH>O!

I am working on some ~animations~ for my game, although theres a problem.

I want my animations to feel smooth- to put it simply, how could I make a smooth transition between animations?

For example- fadetime is a useless ‘useful’ parameter that allows people to transition between two animations by mixing (?) the animations together, basically just fading one image out and one image in at the same time.

Theres a problem- THIS ONLY WORKS AS A LINEAR FADE !!!

rage

I don’t want a linear fade. What’s the point? The default fade is linear anyways!

Example on what I DONT WANT!!!–


You can see, at the last swing, it uses a linear graph to transition to the idle animation.

How would I make this smoother? Keep in mind that I don’t want to replace the default Animate script for this.

A thing to note- I know that Animation Weight exists, but I, honestly, have no idea how to use it correctly, despite being an animator…

Please help :pensive::pray: (I honestly just need to be shown how to use Animation Weight correctly)

2 Likes

I’m assuming this is close to what you wanna achieve? (I’m using the Bounce easing style to easily see the transition effect)

I’ve personally never had experience with animation weights either so I had to study them to understand how they worked for this post!

I can’t explain how I did the entire script detail by detail because I’m running a bit low on time at the time I’m writing this, but in short the script gets 2 animation tracks, then it gets 2 weight values (the initial weight value, and the target weight value) of the first track and then modifies the alpha to add in the easing effect.


Here’s the place file if you’d like to study the script itself.
WeightTransitionEffect.rbxl (53.6 KB)

1 Like

I’m not sure how helpful this is to you, but I often play corrective animations when an action ends to make sure that joints move realistically while fading. (Like arms being crossed, I don’t want them to fade through each other I might make an animation that “nudges” an arm under the other)

Another thing I often do is in an animation that is looped I’ll set a keyframe event that is where the loop should go back to the beginning using GetMarkerReachedSignal, but if I want the animation to end I will let the animation go through that event in which gives me control over how the animation should end.

The issue in your image looks like that there’s no build up to returning to your idle stance, you end on the follow through of the kick and immediantly go straight to pose. You might want an animation that shows the feet side-stepping or the arms balancing. I think the arms are what is most off putting because they return immediantly to the sides while the character should be regaining their balance.

3 Likes

Actually, good catch- I am actually applying this to the abilities. However- these animations are just the normal swings, so they need to be efficient.

1 Like

Now- regarding the actual point- I simply do not have time to make in-between animations for each single animation. I would just like it to happen automatically. (I might’ve read your post wrong, though)

Just rewrite the Animator class. Easy.

use the resource provided by @thom463s, I plan on working on tooling for animation soon because I’m tired of the jank and blockiness in Roblox animations.

1 Like

Thanks!- While your code IS a bit crude- I understand how it works now!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.