Fresh Cooked Tweens - I'm open source-ing my tweening library for you all

=====Update=====
I have now launched a new version on Fab, with lots of new features!

  • Easy-to-use weak lambdas, with ->BindTo()
  • TweenQueues, to queue up one tween after another
  • Spline Tweens
  • Shortcut functions such as PlayActorLocation and PlayWidgetOpacity

Find it here:

The below free and open source version will continue to exist on Github.

==========

Fresh Cooked Tweens - open source version

Here you go! GitHub - jdcook/fresh_cooked_tweens: Tweens for Unreal Engine, with C++ API and Blueprint support

C++

FCTween::Play(
    GetActorLocation(),
    GetActorLocation() + FVector(0, 0, 50),
    [&](FVector t)
    {
        SetActorLocation(t);
    },
    2.0f,
    EFCEase::OutCubic);

Blueprints

Result
cubic_demo

Highlights

  • Compatible with both UE4 and UE5
  • Many easing functions, including elastic and bounce
  • Easily hook up custom curves as well
  • Performant
    tweenstress
  • easy to use and flexible
  • Fresh documentation, cooked with much love
  • Freeeeeeeeeee

What is Fresh Cooked Tweens?
It’s a lightweight tweening library! It’s fast and performant, and crafted around a real workflow to be very easy to use and adaptable. I have also cooked up some tasty docs for you, take a look at the readme on the repo’s front page.

Why Tweens?
Tweens are great for those little polish animations in any project - they see a huge amount of use in UI, even in large budget endeavors. So many things just need a little ease, instead of a harsh linear movement. For example:

  • A coin bobbing in the air
  • a pause menu moving onscreen
  • transitioning between camera locations
  • a purchased item moving into your bag
  • a collected item moving into a HUD counter

I’ll get an even broader use out of them for my personal projects, like those bobbing animations players love so much:
bob_demo

Or even main character animations for the right kind of project:
penguin_demo

WaddleRotator = GetMesh()->GetRelativeRotation();
WaddleTween = FCTween::Play(
    -WADDLE_ANGLE, WADDLE_ANGLE,
    [&](float t)
    {
        WaddleRotator.Pitch = t;
        GetMesh()->SetRelativeRotation(WaddleRotator);
    },
    WADDLE_SECS, EFCEase::InOutSine)
                  ->SetYoyo(true)
                  ->SetLoops(-1);

Why not just use Timelines?
Timelines work great for some purposes, but tweens are generally easier to set up, easier to tweak, and you just get stuff done faster, which results in higher quality stuff that you have put more iterations into. Fresh Cooked Tweens gives you a much easier way to set up those animations in code, as well.

Where to find me
You can find me on Twitter here, where I post about this plugin, as well as what games I’m working on:
https://twitter.com/FreshCookedDev

10 Likes

Thx for sharing this. Just did a small test and works really well!

1 Like

Thanks for sharing! Awesome work!

1 Like

This is amazing, thank you so much. This makes my blueprint experience so much better

1 Like

Hi, each time I close Engine and Open again the Blueprints nodes are broken.

I’m using UE 5.5.4 and "Tween Float Custom curve " Node.

Hi RolloCasual, I was not able to reproduce this, but we can continue the discussion in the github issue.

Update
I have now launched a new version on Fab, with lots of new features!

  • Easy-to-use weak lambdas, with ->BindTo()
  • TweenQueues, to queue up one tween after another
  • Spline Tweens
  • Shortcut functions such as PlayActorLocation and PlayWidgetOpacity

Find it here:

The free and open source version will continue to exist on Github.