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

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: