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

AnimationNodeStateMachinePlayback.travel() gets stuck for nested state machines #85640

Closed
Maaack opened this issue Dec 2, 2023 · 3 comments · Fixed by #85794
Closed

AnimationNodeStateMachinePlayback.travel() gets stuck for nested state machines #85640

Maaack opened this issue Dec 2, 2023 · 3 comments · Fixed by #85794

Comments

@Maaack
Copy link

Maaack commented Dec 2, 2023

Godot version

4.2

System information

Linux

Issue description

A nested state machine isn't traveling to its animation in _ready() in 4.2 as it was in 4.1.3.

In the ready function, we make the root state machine travel to the state of the Stages nested state machine. Then we immediately call the Stages nested state machine to travel to Stage2. This works fine in Godot v4.1.3, but not in Godot v4.2, where it seems a delay is first needed for the second travel animation to work.

image
image

Steps to reproduce

Run the MRP below in 4.1.3 and 4.2.

In 4.1.3, the animation tree will reach Stage2 and show Finished on the screen.

In 4.2, the animation tree will only reach Stage1 and show Stuck on the screen.

Minimal reproduction project

MRP-AnimationNodeStateMachinePlayback.zip

@Maaack
Copy link
Author

Maaack commented Dec 2, 2023

This could be related to #85600 ?

@TokageItLab
Copy link
Member

TokageItLab commented Dec 4, 2023

This could be related to #85600 ?

It is totally irrelevant.

This is an unintended1 bug, so I suspected that there was a breakdown somewhere in the 1:1 conversion of the AnimationTree and AnimationMixer blending algorithm (there were a few stinky parts, but nothing to do with this problem), but the main problem was that the travel path was generated at an unintended timing (too early) and processed twice. I am still investigating.

Footnotes

  1. AnimationMixer was implemented based on AnimationTree, even though regression may occur in AnimationPlayer, AnimationTree should not

@TokageItLab
Copy link
Member

TokageItLab commented Dec 5, 2023

As a result, it is due to a missing test_only flag by porting that caused the travel path to be generated in situations where it should not have been. This will be fixed by #85794.

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.

2 participants