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

Hi ,

It seems that the plugin works fine in the editor, but it won’t work in the packaged game. has a wiki talking about this

I tried to follow 's tips, put the itween plugin folder into the Engine/Plugins/Runtime, and edited the .uplugin file, the plugin could work in the editor again, but it fails to package with unknown error

PS:I saw the reply of , is there any problem on shipping game using this plugin?

Hey SpiritJZL,

I tried building a game using the plugin this morning for both Windows x86 and Windows x64 in both Development and Shipping configurations and was successful.

For what platform are you packaging? Are you using the C++ installation or the plugin (blueprints) installation? Which version of iTween are you using? We had packaging issues before but they were fixed in v0.8.6d as far as I know. See this post: [Open Beta] Procedural On-the-Fly Animation in UE4: iTween! - Blueprint - Epic Developer Community Forums

I start a new BP project, it works……Then I realized that I installed a bp version to a c++ project, should this be the problem?

I used 4.12ver that you posted in #426 last page, and UE4.12.5

No, all the versions are cross-compatible.

There must be something in your project conflicting with iTween. Do you currently use any other plugins? Can you paste the output log ? Let’s narrow this down!

Forgive my time zone, it’s morning now. Unfortunately I have deleted the problem project, it is a project to test how plugins work in package games when I saw 's page.

I do have an other plugin, “UMG Rich Text Box”. This plugin is out of date, so when I put it into the project’s Plugins folder and open the project, it showed recompile if my memory is correct.
After that is the problem, the 2 plugins works fine in the editor, but they won’t work in the packaged game.

But last night I tried the “copy paste” method(the last reply of RichText page), and a C++ iTween into a C++ project, now all the 2 plugins could work fine in a packaged game.

Hello all, I’m having a problem and I’m like 99% sure it’s Itween.

Everytime I hit play my game crashes. Itween has been working in my project for months now and all of sudden without me even messing with Itween or itween functions, it stops working. I’ve linked it to one of my blueprints that uses the actor rotate from-to. I have Itween in other functions and they don’t seem to be crashing the game. Does anyone know why this could be? I uninstalled and reinstalled ITween and it still happens…

Heres the crash report

Well that’s great! I’m glad to hear that. Thank you for replaying back to the thread.

Hey , sorry for the latency - I again haven’t been getting notifications for this thread even though it’s subscribed. If you ever need immediate help you can PM me, I do get notifications for those :slight_smile: I know 9 days is a long time to be without help for a crash!

Based on the call stack, it’s happening when the iTween event is being created. It looks for the player pawn (which I need to change as some games do not use a pawn) and spawns it near the pawn in an effort to avoid problems in large-world games. Again, if you don’t have a pawn this can cause a crash.

However if other tweens work it seems odd that this one would cause a crash. Do you call this tween right as you de-possess your current pawn? Does the actor you call it on have a kill pending? This shouldn’t crash the engine but I want to check all angles :slight_smile:

Would you feel comfortable posting a screenshot of the offending blueprint?

Hey,

I’m trying to set up a actor that will move to a location with ITween and repeat using pingpong, but, when using ActorMoveFromToFull I’m getting strange movement.

The actor is moving between the 2 points and repeating but it is skipping in large steps, kind of teleporting. I recall using ActorMoveFromToSimple and not having the skipping problem, but I need the tween to repeat which isn’t an option with ActorMoveFromToSimple.

's my call to ActorMoveFromToFull, have I done something wrong?

I’m working with v0.8.7 and UE4.13. Any help much appreciated…

Cheers!

Hey Wargasmic, could you provide a video of the behaviour? I’d like to see what the result it, it would definitely help finding the cause!

Dude!! , thank you so much for this plugin :D! You’ve made my game so much easier! I used a lot of lerp/timeline-ing and it was just a huge headache, you’re the best!

You’re very welcome! I was in the same boat as you a couple of years ago and that’s the very reason I decided to port this thing over from Unity. I’m really glad you find it useful!

Hey,

Sorry for the extremely late reply, I haven’t been around for a while.

I’ve just made a short video showing the behaviour and am uploading it to YouTube now. Ill edit this post when it’s done processing.

's the video.

The things moving left to right have very large skips.

Thanks for the video! May I ask, which easetype are you using? Could you post a screenshot of the iTween node?

I’m using C++. In the video the easetype is linear but the same happens with other ease types too. You can see the easing but the skipping is still there. 's the function call…

As I mentioned in my first post, the skipping doesn’t happen with ActorMoveFromToSimple, but I need the tween to repeat which is why I’m using ActorMoveFromToFull.

Hello again Wargasmic, trying to repro this tonight, I didn’t quite get results like you had, but I think I know why your results are jumping. TimerInterval is set to 1.0f in your call, so iTween is only updating every 1 second. For smooth movement, you want TimerInterval to be under 0.05 (0.03 to force ~30 fps, 0.016 to force ~60 fps if you’re rendering at 60fps or higher) or just leave it at 0 to have it update on tick.

The reason you don’t see it when using “Simple” is because this isn’t an exposed option in the call, so it’s using the default value of 0 so it updates every Tick. If you’d like, you can pass a command into the “parameters” field to enable pingpong. When calling the ActorMoveFromToSimple, type “looptype = pingpong;” in the Parameters field. Type the quotes when doing this is C++, of course. Parameters in Simple make it easy to add options not found in the call so you don’t have to type out all of the parameters in the Full function.

I initially wanted to use “Simple” but was unsure how the parameters are formatted. Thanks for the info, the tween is working smoothly now.

Is it possible to pass callbacks in the parameters, specifically, for every time the tween loops? I would like to play a sound effect each time the object changes direction.

Cheers!

Glad it works now! A majority of Parameter commands can be found on the wiki: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Unfortunately I haven’t had time to update it in a bit, so callbacks aren’t in the wiki but they do work in the parser. With the “Simple” node you can set an object as the loop target then use “loopfunction” or “olfn” (short for “on loop function name”) then specify the function name. For example “olfn = MyFunction;” or “loopfunction = MyFunction;”. I’ll add these to the wiki when I remember :stuck_out_tongue:

This will call your function every time a loop section completes so for your situation it should sound every time it changes direction without having to do anything extra.

Thanks again , but after attempting to use callbacks as you suggested upon starting the game (PIE) the game freezes for a few seconds (for the first run) then starts running as normal but the callback isn’t being called.

is the function call now along with the PlaySound function. EDIT: I also tried using “olfn” in place of “loopfunction”

Cheers!

Hey Wargasmic, the reason it’s not working is because you must define a target object that exists in the world. It’s a bit of a pain in C++, but it’s not much more code to add.

Assuming the object that’s calling the tween is also the object with PlaySound, you can use this function:

tweenComponent->ActorMoveFromToSimple(“Move”, this, from, to, ECoordinateSpace::world, false, 3.f, EaseType::easeInAndOutQuintic, “looptype = pingpong; loopfunction = PlaySound;”, nullptr, nullptr, this);

In this call, you’re specifying that ontweenstarttarget is null and so is ontweenupdatetarget. Then Ontweenlooptarget is the calling object.

[MENTION=13335] [/MENTION]

I have to ask this only because of the Cyber Monday sale, but does ANYONE happen to know the differences or pros and cons between iTween, and HorizonTween:

I’m torn between the two because I don’t know what features/functions each one offers that the other doesn’t.