I read your response a few times, @MostHost_LA, but I don’t quite understand what you’re explaining with regard to the truncation of the idle animation “ahead of its full course by the end of the turn.” I currently have a Turn-In-Place state that transitions back to the Idle state once (bIsMoving && bHasMovementInput) || (SequenceLength - CurveTime) / SequenceLength < 0.05f. I have not yet created any logic for an “early out.” I’m hoping blending will cover issues I may have with animation smoothness for an “early out,” but I haven’t yet gotten to the point of checking the robustness of my assumption.
Now, what I said may not address what you said, but that’s because I’m not clear on what you mean. To add a bit more in hopes to address your message, I don’t have any noticeable issues starting and ending differently based on how far the character transitions.
Anyway, any clarification would be appreciated, since I’m guessing you’re providing some wisdom I could learn from.
Mostly I was overthinking it.
While you should keep track of what frame you exit by getting the value of a curve that counts frames and storing it - you don’t really need to do anything special.
In the following setup
start,
auto transition checked -
idle portion (but not a loop)
boolean transition -
end
auto transition (back to idle).
The transition from 2 to 3 will happen whenever the boolean is toggled. Regardless of how long the animation is.
That’s a problem with fastapth 90% of the time, since usually you want transitions to happen after an animation has fully played out, and the only way for fast path is to use a boolean transition and you cannot check if the animation is finished. (If you are trying to solve that, try state machine nesting.)
Again, it was mostly just me rambling.
But to answer again. If you create an animation curve that represents time played, it’s easy to pull the value.
I use this to time the starting animation of paired animations.
It would be nicer and cleaner to do precise “frame” counts, but you’d have to rewrite half the engine to cause the animation to transition at precise frame intervals…
the way you already have it, simplest thing to do is to has a turn recovery state just like paragon. i personally made the turn in place uses a single frame animation as well, and i am manually advancing it (+delta time * play rate) this gives me the current time of the animation and allow me to use same function for distance matching to get current rotation curve value and apply rotation with it. by knowing what is the current rotation curve value you can also know when to transition to recovery state (ABS(Current Curve Value) nearly equal ABS(Max Curve value). with this you transition as soon as you finish your rotation and you can start another turn in place immediately without needing to wait for entire animation to end.
Thanks for the feedback and clarification, @MostHost_LA. I am currently in the middle of remaking my system in a “designer friendly” way (meaning a lot of logic will be presented in BP), and this remake gives an opportunity to refactor. I will consider your input as I refactor the transition logic.
Thanks for your input as well, @SirKaizoku. I’m doing something similar to what you mentioned. I am using a Sequence Evaluator to drive the turn-in-place animation by time. As I refactor my code (and BP stuff), I’ll aim to implement a recovery state in a way similar to what you suggested.
So I’ve been working on this the last week for our project and I’m using @ 's Distance Matching plugin in addition to the open source Custom Anim Node plugin for Speed/Orientation warping. I’ve watched [Nucl.ai 2016] Bringing a Hero from Paragon to Life with UE4 - YouTube so many times at this point and I feel like I have a good understanding of everything expect the jumps. I’m having trouble translating what he is saying into how they use the values of the anim curves for their jumping animations.
For example:
Take off:
What I know: They do distance matching from the take off marker. The animation has a DistanceCurve from 0 to 116.267 which I use to synchronize the frame position based on the distance (height) from the takeoff marker using the DistanceMatching node (makes sense).
What I don’t know: How they determine compression of the mesh for a few frames to keep the feet on the ground. There’s also a DistanceToApex curve from 0 to -5.222 which I don’t know what is used for.
Apex:
What I know: They time synchronize then time stretch.
What I don’t know: There is a DistanceCurve and a DistanceToApex curve that are both -1.658 to 20.292. I’m not sure how to use these to accomplish time synchronization since those curves don’t seem to reflect time based values. Nor do I know how they calculate the time stretching to feed into the apex animation’s play rate.
Landing:
What I know: They do distance synchronization to the predicted landing marker to determine when to start the landing animation. The animation has a DistanceCurve from -93.636 to 0 which I use to synchronize the frame position based on the distance (height) from the landing marker using the DistanceMatching node (makes sense).
What I don’t know: There is a DistanceToApex curve from 30.067 to 0 which I don’t know what is used for.
So I’m really mostly struggling with the apex animation, and the usage of the DistanceToApex curves. I’m using the Paragon Wraith animations if anyone is wondering. By the way, really cool thread here and lots of really knowledgeable and helpful people!
This is one of the cases where what they have makes little sense.
The time to your jump apex will always be the same for any jump unless you somehow include a way to jump More or Less via gameplay in some way.
If you do a standing jump at your maximum best you will almost always jump the same height regardless of where you are in the world - top of himalaya, sea level. Its all the same more or less.
(Yea in a theoretical way gravity is stronger or weaker based on altitude, but c’mon whos measuring picometers on a jump animation??? And find me an athlete who can be consistent to the picometer in the first place).
Perhaps - they are using the same animation from running jumps and standing jumps.
I suggest you just use different animations alltogether anyway.
Jumping forward or to the side is very different than jumping while running.
If you took the time to make a proper motion matching system, you can take the extra week to produce proper jumping animations…
That said, the apex animation is a loop, and you need to interrupt it at the right time.
Which could be something the apex curve is used for.
I find it superfluous as the transition can be driven from the prediction just as well.
Afterall as soon as the prediction can find an answer is probably a good time to exit the loop and enter the landing animation.
You can “loop” in an idle state forever untill the world kill z hits…
Sometimes - the end will cut the jump time. Such as when you jump on a higher item than the floor you are on.
Instead of using recovery timing on this, I opt for a different animation alltogether. Most of the time, it will be something with the use of your hands…
if you already have take off , jump apex and jump land locations you just need to map the distances from those to the ones in your animation, meaning:
when you take off, take your total jump distance (takeoff - apex) * by a value you save as variable between 0-1. this will be “max jump start distance”.
Map current actor distance from take off where in value min is 0 and max value is
'max jump start distance", out value min is first curve value in start and max is last curve value.
then you do automatic transition to apex anim.
you do same for apex , when you enter the apex state you save the current distance to apex and use it as max in value with same value but negative * float you change ( so distance going down doesn’t have to be exactly same as going up. then map distance of actor to apex location to curve min and max (multiply the distance by you z velocity sign to get positive value when going up and negative value when going down. then automatic transition to land.
when you enter land state you take current distance to land point use that as max land distance and map that to the curve in the animation just like others.
With Distance Matching you can use a calculated distance value, to or from, a target to drive Animation Sequences. Distance Matching can align animation playback with character speed, reducing the need for manual animation tuning when altering character behaviors.