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

This is the first I’ve seen of this, to be honest, and it looks like it doesn’t have any features per se that iTween doesn’t have. Of course, having not seen everything, I can’t say for sure.

I can say that it does look to be at least HEAVILY INSPIRED by iTween. Epic has assured me it is a unique asset. Best of luck to them.

are the pros and cons I can offer as of now:

iTween Pros: Free, powerful, open-source, if any features are lacking I can add them for free, timely recompiles and bugfixes, free and timely support
iTween cons: Not updated regularly and I can make no promises about new features being implemented in a timely manner

HTween pros: Seems easier to use, you have leverage of payment over the creator when asking for new features or fixes
HTween cons: Not free

So, still up to you in the end which way you want to go. I’m sure you’l have a good time either way.

Thank you [MENTION=13335] [/MENTION] I too was puzzled when I first saw it because I’ve been following your project for a while, and at first I thought that HTween was just the marketplace version of iTween, so I was quite confused LOL

Anyway, I think I’ll choose iTween :slight_smile:

:wink:

If you see any features iTween is lacking, bring them up and I’ll add them to the update list.

As long as there’s solid documentation with occasional video demonstrations, I think iTween is everything I need :smiley:

Hey all, I’m really loving itween - it’s perfect for my needs, but I’m running into an issue. I originally manually installed on 4.12 for both C++ and blueprints by placing the itween folder into my source files and rebuilding the solution, then proceeded to build some classes through blueprints. Everything was working beautifully, but my hot reload compile times became painfully slow, so for the purposes of speedier development via C++ I decided I’ll be fine with just the blueprint version.

So I deleted the folder and reinstalled just the plugin version (used the installer this time) and rebuilt my solution, but now I get a “Failed to load script” error upon restarting my project for all of my itween scripts. Strangely, if I right click on my event graph and bring up another itween fn, it compiles and works just fine - but reverts to an error if I close and re-open my project.

Pretty confused at this point and I’m not accustomed to working with plugins so any insight would be awesome. I’ve tried clean uninstalling and re-installing the itween plugins both manually and through the installer to no avail.

So your blueprint is referencing a script from C++; you’re going to have to replace every single instance of iTween with the new blueprint-only calls. Then compile and save, it should be fine as long as there are no traces of C++ iTween calls whatsoever.

Hot reload is going to take ages the first time or if you edit any iTween source files, but after it’s been compiled it shouldn’t take long if never changed - at least that’s the case for me. I know it’s super unhelpful to say “hey, works on my system” but that’s pretty much the size of it. I think your best bet is to remove the plugin and go back to the C++ version. Give the engine a little time to acclimate, hot reload times shouldn’t be a problem for long. If they continue to be, if you’re comfortable with it I’m glad to take a look at your project and try to figure out the stopgap.

Thanks so much for your help - I really appreciate you not only offering this free plugin but helping scrubs like myself out. I removed all the references and we’re back in working order! However, in reference to the hot reload times with the c++ version, I was noticing painfully long hot reload times even with simple changes to classes unrelated to itween. I realize this makes no sense because the compiler has no reason to rebuild the itween classes if they remain unchanged, and I’m running a fairly strong overclocked 3770k on an ssd which averages ~4 second hot reload times before adding the plugin.

So you’re suggesting it may need an adjustment period and that if working properly my hot reload times should remain the same unless fiddling with the itween classes, correct?

Maybe! I’ve never actually seen compile time that low for hot reload. In my current project if I remove iTween, my compile time is around 24 seconds just adding a new function to my class.

With iTween added as a C++ class family, adding a function to a class unrelated to iTween with no includes takes around 26 seconds, which makes sense as the project is bigger with iTween added of course.

If I include iTween in this class but do not call any iTween functions and add another simple function, compile time is about 51 seconds - a stark change. This does not ever get reduced.

If i take the last scenario and add a call to an iTween function by c++, times are similar.

Adding a function to another class unrelated to iTween other than including the last class sees compile times reduced once again.

To be honest, I’m not completely sure why this happens. I don’t have much insight into the unreal engine compile process. Using the information I found above, the inference I can make regarding this issue is that you are including iTween in one of your C++ classes. Unless it is 100% necessary, I’d remove the include and stick to calling iTween from blueprints making use of inheritance and virtual functions as needed to avoid calling it in C++.

If you must call via C++, I’d put the calls in a separate class and reference it with the class you’re making a lot of incremental changes to. For example, MyGameCharacter.h should NOT include iTween.h, but instead another class MyTweenerClass.h that itself includes iTween.h. Make the calls to iTween from this class. It’ll still take a longer time to compile MyTweenerClass, but in case you’re making many more changes to MyGameCharacter than MyTweenerClass, this should keep compile times down in the long run. Again, it’s fastest to do it all in Blueprint if you can manage that.

My best guess is that the iTween/iTweenEvent classes are so large. I may be able to mitigate this by splitting these classes up into smaller classes, but I’m wary of doing so - it would be a huge timesink and may actually break existing projects - something I’m not keen on doing again. Maybe I can explore the possibility on my next long flight :slight_smile:

For reference, the processor on which I tested runs at 2.6 GHz stock, 3.2 under load, 4-core i7 with hyperthreading turned off.

I am trying to use “float to/from” tween to animate a random UPROPERTY.

I am failing to understand how to use it despite going through video tutorials.

Are there any examples how to use “float to/from”?

Can you show example how to animate a random UPROPERTY of Actor/ActorComponent? Is it even possible?

Can you show example how to use “float from/to”?

Can you make the plugin compatbile with UE4.15?

thank you for this great job.
i have a question why i can not use itween as a plugin?I mean how to put itween into plugins folder

Any ETA on the 4.15 version of the plugin? (can we expect marketplace version of the ‘iTween for UE4’?)

Hello guys!! Thank you very much for your awesome plugin! Im using it and its giving me a problem, but perhaps its just because Im failing to configure it correctly.

I want my AI to walk around a spline path. It does this, the problem is, the curves are not handled very realistically. I want my character to directly orient to the path it is taking. This means it should always be facing to its movement direction. The problem is there is a slight drift effect going on. is my configuration.

This still happens even when I set the orientation speed to 9999999999999999…

its as if the orientation is not updating fast enough.

Any help is much appreciated. Kind regards :slight_smile:

Hey, just as a followup to this in case anyone runs into a similar issue; I never solved the slow compile times so I gave up on the C++ version and I’m using only BPs, but the failure to find the itween scripts on the BP side of things was solved by changing “LoadingPhase”:“Default” to “PreDefault” in my .uplugin file.

Hey guys, sorry for the delay. I only occasionally get notifications for this thread (I don’t know why) so if you need my attention please PM me or quote one of my posts :slight_smile: Then I get an immediate notification!

The build has been updated in the first post, you can grab the latest from there. I honestly didn’t even know 4.15 had released, so cool new fun things for me to work with too! Sweet!

As for a Marketplace version, that’s up in the air at the moment. I am working on some projects for the marketplace to be sold (not iTween stuff, that remains free) and I may put the plugin on the marketplace after I learn how the process works, but there’s no guarantee of that at the moment. For now the best place to get it is from this thread and as long as I am working with UE4 I will keep the plugin compiled and updated for newer engine versions. And of course, source is available if you can’t wait for my *** :slight_smile:

Hi evehal, thank you for the kind words!

I don’t believe this plugin plays nice with the engine’s plugins folder, you have to install it directly to your project’s plugins folder to guarantee compatibility. First make sure you have the right version for your engine version (I just uploaded the build for 4.15, so that may solve your problem!) then make a folder called “Plugins” in your project’s root folder if you have not already. Then copy the “iTween” folder inside the archive and paste it into the Plugins folder you created. If you’re on Windows, you can use the included iTween for UE4 installer and simply choose your project folder - the installer will handle the rest.

I’m really sorry we couldn’t figure this out, but I am glad you found a good workaround. To be clear, this isn’t something you should have to do - it should work right out of the box. But sometimes weirdness happens.

Sure, all of this is possible using delegates! The tutorials are a little outdated, yeah. I do apologize for that. One day I will get around to making more updated ones, but the design of the plugin is guaranteed to change so it may not be soon :stuck_out_tongue:

the data tween updates a float, vector, color, whatever every frame and then stores them in a struct called “dtv” - you can also get it by typing “Data Values.”

First call the tween and pull out of the return value pin - type “dtv” or “data values” and you’ll get the data values struct from it. Get the float value from that struct.

In my example, I’m using a float tween to make a number in a UMG widget decrease steadily over time until it hits 0. This is a real world example from a game I’m currently working on.

On the Tween, you can specify the OnUpdateFunctionName and set the OnTweenUpdateTarget to be “self.” In this screen I’m using the Simple node, but you can do it with Full too. If you use simple, you’ll have to use the parser to set the function name - “oufn = UpdateNumberText” or whatever you want the function name to be. You don’t need the “oufn =” part if you’re using the Full node.

Side note: “oufn” stands for “On Update Function Name.” You can also type “OnUpdateFunctionName =” or “OnTweenUpdateFunctionName =.” Whatever you feel most comfortable with. The other delegates abbreviate similarly (OnCompleteFunctionName shortens to “ocfn,” for example).

Then create a custom event or function named the same, in my case “UpdateNumberText.” This function will be called every single time the tween updates and in this case, we want to update the number every single frame. 's what the setup looks like:

You can set any property on any object in this way. Does that information help?

Hey Jorjouto! The orientation isn’t really meant for character movement so much, it’s more meant to be used for moving gameobjects. If you’re looking to use AI following a path, iTween probably is not the way to go - you’ll likely have better results using the built-in AI motion functions like “AI MoveTo.” To make an AI follow a spline in this way,
you can try something like this:

Int his example we have a variable on the event graph called CurrentSplinePoint starting at 0. Then we make our AI pawn move from its current spot to the first spline point then when it gets there we increment the variable and have him go to the next one until he gets to the very end. This is probably a better option for you as your AI will avoid obstacles using the navmesh you’ve generated.

If you’d really like to use iTween for this for your specific situation, I’d say your best bet is to handle orientation on your own - use “No orientation change” as your option and every frame set the actor’s rotation to be the rotation at time along spline multiplied by the spline’s duration (by default this is 1 so you shouldn’t have to do this multiplication if you haven’t changed the duration). 's how that looks:

It’s a bit of a spaghetti mess to implement, so I’ll add this to the list of things to have built-in. I’ll have an option for “smooth” (current setting) or “set” (directly setting orientation to spline). For now this is how it would work :slight_smile: