Tom Looman published an article presenting a solution using curves and math, which can be enhanced with additional features.
Tom Looman, the creator of the deservedly popular Unreal Engine C++ Pro Course, has shared a walkthrough of the source code, providing a starting point for building your own animation subsystem, which you can expand on with examples provided on GitHub.
Unreal Engine offers plenty of ways to animate or interpolate objects, however, many of the available tools can be complex and not particularly lightweight or user-friendly when it comes to working in C++. This is especially true for cases where you're not dealing with skeletal meshes, such as animating the radius of a gameplay ability, opening a static mesh treasure chest, or any other kind of value interpolation to use in your game code.
For something simple like opening a treasure chest, advanced tools like Sequencer or Control Rig are unnecessary. Instead, you can interpolate between two values with a non-linear curve, adding a subtle bounce or easing at the end for a more polished in-game effect.
Tom provides a clear explanation of how to create a simple C++ animation system within an Unreal Engine Subsystem. By using Curve Assets, you can trigger and control animations in C++ while allowing a designer in the Unreal Editor to fine-tune the animation. Alternatively, you can use math-based animation, with easing functions being the most common method.
Read the article here and please note that this is not a step-by-step tutorial to follow along with. The source code can be found in the Action Roguelike project on GitHub.
Visit Tom Looman's site for more insightful articles and join our 80 Level Talent platform and our new Discord server, follow us on Instagram, Twitter, LinkedIn, Telegram, TikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.