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

Multiple AnimationTrees don't restart secondary animations on StateMachine transition #57223

Closed
Tracked by #73534
FreegleBarr opened this issue Jan 25, 2022 · 0 comments · Fixed by #75759
Closed
Tracked by #73534

Comments

@FreegleBarr
Copy link
Contributor

FreegleBarr commented Jan 25, 2022

Godot version

4.0.alpha [30701e3]/3.4.2.stable.official

System information

Ubuntu 20.04

Issue description

I'm not sure if this is relevant as I couldn't find anything official mentioning the use of multiple AnimationTrees coupled with multiple AnimationPlayers, so this could just not be supported.

When a scene has multiple animation players being controlled by multiple AnimationTrees, which share the same BlendTree and Playback, and the state transitions to another state that is not set to looping, the state will not reset properly upon completion, leading to it appearing to be stuck on the end frame when transitioning to it again. Only the Player associated with the first AnimationTree in the scene will be correctly reset.

I have not tested with different BlendTrees or Playbacks.

Edit: Upon further testing, it seems that all animations other than the first fail to reset in 2nd+ trees.

Steps to reproduce

  • Create a scene with 2 or more animation players and animation trees.
  • Create a StateMachine root AnimationNode in one AnimationTree, save it and load in every other AnimationTree.
  • Save one playback and load in every Tree.
  • Create one looping animation and one non-looping one in every player with the names Loop and Non-Loop. Preferably they should modify different attributes.
  • Now add two States Loop and Non-Loop in the State Machine, and connect them both ways.
  • Play both Loop and Non-Loop once. All your animations should play in sync.
  • Now play them a second time. Loop should reset properly, but all but the first AnimationTree should be stuck in the end.
  • If you change which AnimationTree comes first, the one that doesn't stay stuck will change to that as well.

Minimal reproduction project

Animation.zip

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

Successfully merging a pull request may close this issue.

3 participants