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

Hey tosith, that would be awesome. Maybe PM me, or upload it somewhere.

Did you just follow the standard rebuild video on Youtube, or is there something different that needs to be done this time around?

edit*

the issue I’m having is that I can build my project with no errors in Xcode, but there is no itween available in my project editor.

its almost like it’s not seeing any of the itween source code during build.

The only parts of itween I need are MoveComponentFromTo (which I might be able to replace with the UE4 built-in version) and MoveActorFromTo (which has no equivalent in UE4)

any help much appreciated!

Sorry for the delay, stansdad. 's the link to the 4.18 version of the plugin - MEGA Hope it will help you to continue work on your project.

Thank you for this mirrorlink! I can reproduce this issue - I’m going to try to figure out why.

Hi geordie, thanks so much for these! I love when people find crashes, honestly. Nasty game-breaking bugs are oftentimes easier to track down and fix or work around than simple nuisance bugs. That said, I’m not sure what we can really do about the first issue - the tweening object must spawn near the player (or Camera, but we can’t get the camera without the camera manager which is taken from the player controller). We can’t get the pawn, which is what used to happen, because there isn’t a pawn in every game. We can’t get just the player controller anymore (since it no longer has a public transform getter (4.19). We also can’t get the viewport because even though it’s guaranteed to exist, it doesn’t appear to have a transform of any kind. So what do you do? My current solution is to get the player controller>camera manager which should have the same transform as the player controller, in theory. That sometimes ends in an error because there is no player controller, though there always should be. For now I’ll just check the pointer and if it doesn’t exist, I’ll abort the tween. That will at least prempt the crash and shouldn’t be an issue for 99% of situations, though it’s more of a patch and less of a real solution. The trick is finding a location that won’t be culled and will be accessible in memory quickly and right now the idea is to find an object with a transform that always exists. Or should always exist.

I will implement your fix for the second crash. That was a sloppy overisght on my part, thank you.

The third point should not have happened at all, the time dilation bug. I was 100% sure I removed that original set-it-and-forget-it code when I implemented the Tick code. That’s annoying, I’m pretty upset with myself for that. Thank you for pointing it out, it will be fixed for the next version.

As for Github, yes, that has been requested before and has been on the backburner for a while. Thing is, I have to learn how to use git :stuck_out_tongue: We’ve always used our own svn solution, so I’m not terribly familiar. I’m sure I’ve annoyed Epic dozens of times with my stumbling over my pull requests for the engine. Gah. I really have to sit down and learn the application sometime.

TastyTurban - thanks for this bug report! I have this fixed now locally. It has to do with the changes to the plugin json structure, or at least what I perceive to be a change. Nevertheless I have updated it and any of the newer build should work. Please let me know if they aren’t working for you still and I’ll try to work out a code exchange with you to figure out why your project isn’t working. I have verified that it’s working on Note 3 and Note 4 with the 3rd person template adding a simple move from/to and rotate from/to to one of the objects.

New Builds!

My apologies to everyone for not being around to see these posts and stay up to date with new engine versions. Right now we’re working in Unity exclusively because the project requires proper mod support and UE4 is just not the engine for that right now. Hopefully that changes sooner rather than later. In fact it was yesterday that I was searching to see if there had been any movement in that area. So far, nothing. When I saw my private messages and announcements of new engine versions, I broke out in a cold sweat realising how far behind I’d fallen. I just haven’t been keeping my ear to the ground in the Unreal space recently since I’ve been keeping my head close to my desktop in Unity trying to work out our modding framework. I very much regret effectively ignoring the people who have come to rely on iTween in Unreal Engine.

So I got to work downloading the newer engine versions, compiling for Windows and Android, and verifying packaging for every version. Due to deprecations in the engine, some code has been adjusted in iTween, but nothing should affect the end user. Please let me know of any new bugs, if any, have popped up from these changes and I’ll do my best to fix them asap.

Recompile for 4.17: iTween4.17

Recompile for 4.18: iTween4.18

Recompile for 4.19: iTween4.19

I have an RSS alert set up for the announcements forum now so when 4.20 drops I’ll have another iTween version ready. Apologies again! Now working on bug fixes.

Figured it out! In previous versions, iTween would iterate over all tweeners that had the specified name and stop them. If you were to create another with the same name it would catch it later. This is why you stopping a tweener reference directly doesn’t have the same effect. So to preserve the original intent and also prevent situations like yours from happening, I have added a new parameter to stop/pause/resume tweens by object or tween name, and that’s a bool called ‘AffectAllMatching.’ When it’s true (default) the application will work as before, it will iterate over all tweens and stop those with similar names. When false, it will affect only the first match then break out of the loop. If you want to keep the current way of doing things, there’s no need to update your code. In your case, just add ‘false’ to your call. Thanks again for the bug report!

Hi, I’m trying to use iTween for tweening UMG widgets. I cannot for the life of me figure out how to get the OnTweenUpdate working. If I specify the function name/target via the string parameter, nothing happens. If I try to use a Full tween and specify the function name and target through blueprint connections, it crashes my Unreal editor when I try to run the game (and gives no call stack to debug). Is there some documentation for the proper way to use this thing? Is this functionality verified to work in the current (4.19) version?

On the latest version, it seems no Move tick

I’m getting compiler errors on 4.18 on Mac, are the compiler errors, could it be the compiler version that UE4 uses on Mac?

Is there a working link somewhere ?

There are some bugs.
<code>
void UiTween::StopAllTweens()
{
for (AiTweenEvent* e : GetAux()->currentTweens)
{
e->EndPhase();
}
}
</code>
e->EndPhase() will remove e from GetAux()->currentTweens,cannot change the array in the loop body.

That’s correct, MoveTick was replaced by MoveUpdate a couple of years ago and marked as deprecated; as of 4.19 it’s been removed.

Apple’s compiler (well, broken on Android too) doesn’t like the way these equations are written because in the equations I assign a value while I’m using it. In the next version I’ll keep trying to chip away at fixing that. When I try to separate that value from the equation it breaks the animation usually, but there’s got to be a way to fix it, just not sure what that way is. For the current 4.20 version, I’ll just limit its use to Windows and Linux. That will allow you to compile at least. This only break EaseInAndOutElastic, so unless you’re using that EaseType this won’t affect you.

First post and this post, as long as you’re on 4.20. Previous versions also found in first post.

You’re right! thank you for pointing this out. I hastily copied this code over from the Pausing logic block and slightly tweaked it to suit stopping but in the end intended to change it, just got sidetracked by NEW FEATURES ™. Thanks again, I have refactored these functions to dump matching tweens into a new TArray that I then iterate over in reverse order, stopping one-by-one. Fixed in the 4.20 version.

Speaking of:

iTween v0.8.8 (compiled for 4.20): http://www.mediafire.com/file/h1x3ta…0.8.8-4.20.zip

New:
-Get tween by tweenName
-Orientation smoothing is now optional when using ‘orient to path’ or ‘orient to object’ on Move tweens
-Some Tween Stopping events that take a parameter (like ‘stop by tweenName’) now have another optional boolean parameter called ‘Affect All Matching.’ When true it will keep looking for all tweens that match the given criteria, such as multiple tweens with the same name. If false, the operation will stop after it finds one matching tween. Turn it off to save a few cpu ticks if you name each tween uniquely.

Fixes/changes:
-‘Get Distance Between Two Vectors’ is now pure instead of impure (for whatever reason that was)
-Deprecated events (‘Tick’ instead of ‘Update’ events) have been removed.
-Refactor of transform code to allow for offsets (still not yet implemented, but this change makes it possible for the future)
-Refactor of tween stopping code (thanks Shadow_Zhou!)
-Temporarily disabled support for ‘EaseInAndOutElastic’ EaseType on Mac/Mobile/Web. It’s still selectable but won’t work as expected – but now users won’t get compilation errors. Still supported on Windows/Linux.
-iTweenEvents are now spawned at the location of the current camera - an object that always exists and is right next to the camera since, well, it IS the camera :slight_smile: This should preempt crashes that were caused by not finding a good transform for the tween.

[USER=“13335”] [/USER]
Can you help me? I want to animate a ball moving using iTween. How do a get it to rotate while it’s moving along the spline?

Hi MDV!

In what manner do you want it to rotate? Do you want it to rotate toward the spline’s orientation, do you want it to look at something, or simply rotate over time?

I want to rotate toward the spline’s orientation.

Thanks in advance.

[USER=“13335”] [/USER]
Any ideas about this? :slight_smile:

Hey just wanted to say thanks again cause apparently I’ll never need to use timelines again lol

cheers

Hey ,

First of all, thank you for this plugin. It’s been super helpful and I quite like how you’ve set it up.

I am using it in a server/client multiplayer game that us running a headless server. Tweens all hard crash the server right now because of the GetWorldLocal() call for spawning the tween object. There is no rendered viewport on a headless server, so if a server object tries to tween something (like an NPC enemy which only exists on the server and gets replicated down) it will crash and destroy the server.

I’ve fixed it locally with some re-wiring, but wanted to give you a heads up about it.

The way I’ve fixed it is:

GetAux() now takes a UObject* which it gets the world off of. I pass in the same object I use to bind tween events to for this, as I always populate those, but you could pipe through other objects where appropriate (like the actor in tween actor).

I also just pass in a Transform::Identity for the spawn position instead of getting the camera, since there may not be one on the server.

Hi ,

Can you fix link for UE 4.21? I can’t download.

[USER=“13335”] [/USER], I really need it.

Thanks.

Sorry MDV, I don’t have the original file any more and I can’t retrieve it from Mediafire. I have submitted a support ticket with them, hoping tehy can get that straightened out. In the meantime, do you have any experience with building a plugin from source? You can use the 4.22 plugin and rebuild your project in C++ and it should work. You can let me know if you encounter any errors and I’ll try to troubleshoot with you. Otherwise if Mediafire doesn’t fix the link before next week I’ll redownload 4.21 and compile it again for you myself. This weekend I won’t be with my computer so I can’t help at the moment! :frowning:

Thank you so much for the heads up! I actually haven’t even tried networking games yet, so this is good information to have! I’ll have to rework this in a future update. It’s hard to use the tweening object as a context object because data tween and UMG tweens make that difficult, but perhaps there is another way to get the world without grabbing the viewport. The obvious answer is to have a context object pin but I personally hate that approach. I’ll have to research this. Again, I appreciate you writing about this!