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

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.

But Jared, it’s so tasty, why would you put all this hard work out there for free?
To beg for attention! It’s what we game developers do!
https://twitter.com/FreshCookedDev

Also to help you all out, since I’ve gotten lots of help from forum posts and tutorials and open source code myself!

8 Likes

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

1 Like

Thanks for sharing! Awesome work!

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