Animation Transition interrupt suggestions

Hi,

I’ve been playing with the new animation tools recently, and I’m enjoying them. However, one thing I noticed about the transition interruptions is that they only seem to check the current state to see if they should be interrupted. One thing that would make it better is the ability to also check for if another state’s transition rule is true.

For instance in this example:

Landing -> Idle -> Falling

Right now, if the player lands on the ground and immediately starts falling again, they’d still have to wait for the landing animation to finish playing and transitioning before the Idle → Falling transition began, which can look a bit jarring. A good way to handle this would be to do something similar to Unity, where there’s an option to also begin interrupting if the next state’s transition rule is true.

2 Likes

I second this post!
Animation interruption is a MUST for 3D game especially for realtime action genre.

I tried to replicate my animation/state machines from Unity to Flax
with this simple State machine

  • Current Flax interruption feature
    Flax fails to play interruption in this case :

Move → Break → Idle → Move

If currently “Break->Idle” transition is playing, and User inputs “Play Move!”
Flax fails to interrupt the transition because it only checks current state (Break & Idle) but not “Move”
As you can see in the video below, the animation needs to wait until “Break->Idle” transition finishes, in order to go to “Move” state.
Even if the script already called the AnimGraphParameter to play “Move” animation
→ This results in Character moving but the animation is locked in “Idle” state for a while, making it look like the Character is “Sliding on ice”

  • The same StateMachine in Unity

As you can see in the video below, Unity correctly plays interruption for the next state
So even when “Break->Idle” transition is playing, it will blend with the “Move” state
if interrupted by User input (Script)

I will also post Git issue here :

I also suggest the dev of Animation/StateMachine feature takes inspiration/benchmark from Unity or other matured engine.
And if possible working with a veteran 3D animator when making this feature,
because there will be small things like this that is actually necessary but easily missed if you’re not used to making a complex 3D game.
Testing with only 1 or 2 states, or simple cases will usually lead to problems like this.

Unfortunately for me,
I find that I can not use Flax for my 3D Action game until this is resolved.
I need to be able to interrupt and blend animation for complex cases :
When the Character is running but get hit, when attacking combos but get parried etc…

Thanks for the feedback. I added task for Flax 1.8 to improve animation transitions interruption (different rules and blending to fix those issues).

1 Like

Thanks for your reply!

Added in Add SourceState and DestinationState modes to State Machine interrupt… · FlaxEngine/FlaxEngine@8c2a156 · GitHub. Now transition can be interrupted by other transition in the source or destination state. The interruption can be instant (if set in options) or with smooth blend (by default) from the pose that model was when original transition was interrupted.

2 Likes

Thank you!

@TheOmnisimush Not sure if this the right problem, but the way i solve it (v1.6) is by adding 4th state and run transition with all of them.

From my understanding, there is an instant interruption, but only work if the transition are two way(correct me if I’m wrong).
Screenshot 2024-01-08 164925

ezgif.com-video-to-gif-converter (1)