[Open Beta] Procedural On-the-Fly Animation in UE4: iTween!

Thank you for the kind words! I’ll be sure to PM you when I’m able to put the fix in!

Hey everyone! 4.26 just released, so 's iTween for 4.26!

2 Likes

Hi, I’ve been trying to use this plugin to create a more advanced weapon sway, using the ease in and ease out elastic. Everything works when I use set relative rotation, other wise when I use component rotate from the weapon just starts glitching out stuttering and rotating everywhere crazy. I also thought maybe doing it with the Float from too node but theres no way to get the output of the float. I would greatly appreciate any help!

iTween may not handle component relative rotations super well in certain situations. It’s something I would like to fix one day if I ever have a free moment I wouldn’t mind spending in a dev environment. You might try to experiment with the Shortest Path parameter or try using transform rotation to do everything in world space. But otherwise I can help you out with data tweens.

In the image below, you can see me kick off a float tween. On update, we call FloatTweenUpdate which gets an actor of class and updates its relative rotation using a value from the DTV struct.

To accomplish this, set up the tween as normal. If you’re using the Full node, add a function name that will be called on update into the “On Tween Update Function Name” field. If using the Simple node (pictured) type oufn = {function name} into Parameters. oufn of course stands for “on update function name.” Both of these nodes accomplish the same things, this is just a quicker way.

I didn’t do this in the picture, but you’ll also need to plug something into the “On Tween Update Target” pin. This is the object that has a function named the same as what you put into the “On Tween Update Function Name” field. In this case since the same blueprint calls the tween and the target function, we’d plug in “Self” .

Finally, in the target function we need to access the float data from the tween. To do so, get the iTween Actor reference from the Return Value of the float tween and search for “Data Type Values”. This should return a struct. Split the struct and get the float from it.

You can do this same kind of thing for any data tweens. You may have luck doing a data tween with a rotator or vector if need be. Try some different stuff. Sorry for the inconvenience there!

That was extremely helpful information, hopefully I can use tween to add eleasticity to my floats and plus them into either interp or set rotation. I’ll be experimenting with it. Thank you for the help, and the plug-in is awesome as well!

2 Likes

4.27 version is found : iTween_0.8.8_4.27.zip - Google Drive

2 Likes

Love the simplicity of this plugin. Might I suggest renaming the interface from IiTInterface/UiTInterface to something more descriptive. The current name makes it show up in the editor as “i T Interface”. I spent an embarrassing amount of time trying to debug why the interface wasn’t showing up in result when searching for “tween” interfaces.

Thank you @BRG_Kara !

I don’t think I will be renaming any classes at this point because I don’t want to break anyone’s projects, but I think I can add some meta data to change the display name in blueprints or at least add some keywords to make searching work better for that. Thank you for the suggestion!

That makes sense. You could however add a core redirect and everyones projects should load just fine. In theory at least. :wink:

In theory is right haha

As someone who has worked on engine plugins on Epic’s payroll, I can safely say that Core Redirects are only a possible solution that works only sometimes. I don’t think it’s worth the number of support emails I will have to sift through. But I do take your feedback to heart , I’ll do what I can without breaking things for anybody.

Hey, @JaredTherriault, hope you are doing fine. I have this nasty error while compaling:

CompilerResultsLog: Error: E:/Game_Files_Z_4.27/Plugins/iTween/Source/iTween/Private/iTweenEvent.h(173) : LogUObjectHash: Error: Ambiguous path search, could be Enum /Script/EventDispatcher.EEventType or Enum /Script/iTween.EEventType
CompilerResultsLog: Error: E:/Game_Files_Z_4.27/Plugins/iTween/Source/iTween/Private/iTweenEvent.h(388) : LogUObjectHash: Error: Ambiguous path search, could be Enum /Script/EventDispatcher.EEventType or Enum /Script/iTween.EEventType

CompilerResultsLog: E:/Game_Files_Z_4.27/Plugins/iTween/Intermediate/Build/Win64/UE4Editor/Inc/iTween/iTweenEvent.gen.cpp(20) : error C2146: syntax error: missing ‘;’ before identifier ‘UEnum’

From what I can see there’s is problem with another plugin using the same enum name.

Thank you @tosith for this bug report.

I haven’t been able to reproduce this, but that may be due to you having another plugin enabled that I do not - nonetheless the fix for this is pretty easy.

What platform are you packaging for? I can supply you with a patched version for Win/Android, but if it’s another platform I’ll need you to edit some source code on your side.

Update 34 (Apr 10 2022)(Recompile of 0.8.8 for 5.0):

While the plugin compiles for UE5, I get a crash immediately in iTween when launching the game.

Can you get me some logs? When does the crash occur? Project launch? PIE? Packaged? Development or Shipping?

PIE, immediately after pressing the play button. I’ll get you a stack trace, I just need to reenable the plugin, since I proceeded to disable it in the meantime to get a working version of my project, since I am only using iTween for one specific thing for the moment.

EDIT: I easily reproduced the issue. I have an actor which extends ITInterface, and in its blueprint at BeginPlay a function that calls StopAllTweens. It crashes in GetAux

UnrealEditor_iTween!UiTween::GetAux() [C:\[...]\Plugins\iTween\Source\iTween\Private\iTween.cpp:97]
UnrealEditor_iTween!UiTween::StopAllTweens() [C:\[...]\Plugins\iTween\Source\iTween\Private\iTween.cpp:419]

It worked fine with UE5 Early Access

Thanks for the repro! I found the issue. UE5 didn’t like the way I was getting the current world. 's the fix:

1 Like

Awesome! Thanks for the quick fix!

1 Like

On “Component Move From/To” node, from location is always start from scene origin (0,0,0) even though coordinate space set to parent and from location given somewhere else. Is it bug or am i doing wrong? UE5

Super weird! I wonder if that’s an artifact of the change to large world coordinates since iTween was built on floats rather than doubles. I don’t know 100% when I will have the time to dig into this I will be at a friend’s wedding this weekend followed by surgery and recovery starting Monday but I will check this out when I have a moment to do so!

1 Like