top of page

Using curves in Blueprint animations

  • 50541507
  • Apr 25, 2022
  • 1 min read

I made Blueprint animation Macros previously, but they've all been linearly interpolated as there was no curve data to pass through them. I decided I wanted to allow for more complex animations by allowing a curve input to be used in the lerp instead of a linear curve.

I did this by first creating a Float Curve object which stores the curve (this acts like a curve in Timeline or Animation), and then started editing the Macro:

I more-or-less just had to add another input for the curve, get its Float Value, and swap the Current Time for that, setting the In Time to the Current Time so that it plays with the same speed and time as the set animation, thus essentially adding a curve to an otherwise curve-less animation. This lets the user set different curves for different situations by setting it as a variable themselves or by calling the Macro again:

The output of this certain curve is slow in, fast out, and vice versa for reverse:

I then decided to change it so there's two curves, one for when the animation plays forwards, and the other for reverse.

The only problem with this is that when changing the state of the button when the animation hasn't finished changes the curve, making it look like it snaps to another animation, which is kind of true. Sadly, this is just a product of using two curves instead of one.

 
 
 

Comments


bottom of page