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

AnimationTree process the extra frame when restarting Animation by some Nodes #61853

Closed
TokageItLab opened this issue Jun 9, 2022 · 2 comments · Fixed by #69336
Closed

AnimationTree process the extra frame when restarting Animation by some Nodes #61853

TokageItLab opened this issue Jun 9, 2022 · 2 comments · Fixed by #69336
Assignees
Milestone

Comments

@TokageItLab
Copy link
Member

Godot version

4.0.dev (b36447f)

System information

MacOS 11.6

Issue description

When selecting a state, NodeTransition and NodeOneShot internally seeks and restarts the animation after it has played once, but processes the last frame at the time of restart.

2022-06-10.1.54.01-1.mov

Steps to reproduce

Play the animation once using NodeTransition or NodeOneshot, then change the state and play it again.

Minimal reproduction project

node_t_state.zip

@TokageItLab TokageItLab added this to the 4.0 milestone Jun 9, 2022
@TokageItLab TokageItLab self-assigned this Jun 9, 2022
@TokageItLab TokageItLab changed the title AnimationTree process the extra frame when restart AnimationTree process the extra frame when restart Animation by some Nodes Jun 9, 2022
@TokageItLab TokageItLab changed the title AnimationTree process the extra frame when restart Animation by some Nodes AnimationTree process the extra frame when restarting Animation by some Nodes Jun 9, 2022
@Rindbee
Copy link
Contributor

Rindbee commented Jun 9, 2022

It may be that when re-seeking in AnimationNodeAnimation::process, the internal step is not reset according to the current state.

Ignoring what we're arguing about, it's actually necessary to let AnimationNodeAnimation know its own state.

@TokageItLab
Copy link
Member Author

TokageItLab commented Nov 22, 2022

The problem with pingpong and the problem that calling last frame will be solved by #68992. The only remaining issue is the first frame method will be called twice by OneShot and Transition.

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