Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation Transitions are not interruptable #43570

Closed
Flavelius opened this issue Nov 15, 2020 · 8 comments
Closed

Animation Transitions are not interruptable #43570

Flavelius opened this issue Nov 15, 2020 · 8 comments

Comments

@Flavelius
Copy link
Contributor

Flavelius commented Nov 15, 2020

Godot version:

3.2.3.stable.mono.official

OS/device including version:

Win10

Issue description:

AnimationTrees allow for blending animations which is important for good looking motion. Sometimes longer transitions need to be used to allow a variety of animations to match up with each other well.
The problem is that transitions (the blending) cannot be interrupted and currently play until done, which makes certain animation types look wrong, for example falling to moving, where small height differences usually start the falling animation, but the immediate switch to grounded typically cancels it and resumes grounded animation. But currently the falling transition takes over and animates the character until the falling pose, even if the initial state is traveled to immediately again.

Edit: It looks like it's the same with manually calling the AnimationPlayer and blend duration as parameter.

See this video with exaggerated transition time:
https://streamable.com/a1vsjp

@TokageItLab
Copy link
Member

@Flavelius If there are more than two state transitions, i.e. no return to the start state, are the transitions working correctly?

@Flavelius
Copy link
Contributor Author

@TokageItLab Unfortunately it's the same:
colcClpjqc

@TokageItLab
Copy link
Member

TokageItLab commented Jan 29, 2021

@Flavelius Is it mean you want to use the any Mode like PlayMode Immediately from script easily? I think this is probably a feature addition.

@Flavelius
Copy link
Contributor Author

Flavelius commented Jan 29, 2021

Sorry, i don't understand that question.
The problem here is, when animations are forced to complete their blending, they cannot be interrupted.
Imagine a transition from jumping to falling where the ground beneath the character is actually just a very small hole, so the character immediately is grounded again.
Currently with this bug, the character completes his falling animation transition forcibly until he plays the grounded animation again, which looks silly and wrong.
There's the possibility that i just misunderstand the 'Immediate' mode of transitions, and that this option is unrelated to 'actually immediately blending' and is just a way to not wait until the end of the animation clip length; in this case it should be renamed to 'After Blend' or something like that.
If that's the case then transitions definitely need an option to make them interruptable (like in unity), to be able to produce intended transition visuals.

When i click play on a state that has 'immediate' set, i expect it to begin transitioning to the target state 'immediately' and not that it's queued up.

@TokageItLab
Copy link
Member

The immediate mode is to run the next Transition at the end of the Xfade of the previous Transition, and the AtEnd mode is to run the next Transition at the end of the animation. In other words, the problem is that it is not possible to abort a Transition and start a new Transition, which is a lack of functionality and not a bug.

@Flavelius
Copy link
Contributor Author

Ok, i began expecting that this is the case. That's unfortunate. I'll create an improvement proposal

@TokageItLab
Copy link
Member

Yes, I agree with the implementation of that feature. I'll keep this in mind as I'm one of the contributors trying to improve the animation feature.

@Flavelius
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants