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

Allow animation blends/transitions to be interrupted in StateMachine #2200

Closed
Flavelius opened this issue Jan 29, 2021 · 4 comments · Fixed by godotengine/godot#71264
Closed
Assignees
Milestone

Comments

@Flavelius
Copy link

Describe the project you are working on

RPG-like multiplayer with many npcs

Describe the problem or limitation you are having in your project

Most of it is already described in this issue:godotengine/godot#43570
The gist is that transitions in progress can currently not be interrupted. This prevents setting up good/professional looking animations as it is quite common to interrupt animations for gameplay reasons and certain transitions are naturally required to be longer.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Just having that be available/implemented will already be the fix.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It could be an exposed option for transitions in blendtrees, statemachines and an argument in the play method of the animationplayer.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It cannot be worked around.

Is there a reason why this should be core and not an add-on in the asset library?

It's part of the core engine

@TokageItLab
Copy link
Member

TokageItLab commented Jan 29, 2021

It will probably be an improvement to the AnimationNodeStateMachinePlayback, or maybe AnimationNodeStateMachineTransition.

@Flavelius So the problem is that you can't force a transition with fast x-fade by using the current start() of AnimationNodeStateMachinePlayback, right?

@Flavelius
Copy link
Author

Flavelius commented Jan 29, 2021

So the problem is that you can't force a transition with fast x-fade by using the current start() of AnimationNodeStateMachinePlayback, right?

I'm mainly using travel(), but i guess start is the same; and if, by fast x-fade, you mean immediately beginning a new transition (with its own duration) from a current transition state (any point in time in that one's duration), then yes.
Similar to how it would look if you started a position tween and stopped it in the middle and started a new tween to a different position, the target would continue from the last tween's middle position to the new end position.

@YuriSizov
Copy link
Contributor

@TokageItLab Is this something that is being worked on?

@YuriSizov YuriSizov moved this to In Discussion in Godot Proposal Metaverse Jul 21, 2022
@TokageItLab TokageItLab changed the title Allow animation blends/transitions to be interrupted Allow animation blends/transitions to be interrupted in StateMachine Jul 21, 2022
@TokageItLab
Copy link
Member

There has been a major implementation as godotengine/godot#61196 in the last few weeks, but I am not familiar with it if this has been resolved or not. I remember that at least the transitions were still broken.
@fire @lyuma Does Advance Expressions interrupt the current state and perform the transition correctly?

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

Successfully merging a pull request may close this issue.

5 participants