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

AnimationPlayer.play_backwards() calls keyframe methods twice #88928

Closed
paulmiller opened this issue Feb 27, 2024 · 1 comment
Closed

AnimationPlayer.play_backwards() calls keyframe methods twice #88928

paulmiller opened this issue Feb 27, 2024 · 1 comment

Comments

@paulmiller
Copy link

Tested versions

reproduced in 4.2.1.stable
not reproduced in 3.5.3.stable, 4.0.4.stable, 4.1.3.stable

System information

Godot v4.2.1.stable unknown - Arch Linux #1 SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:41 +0000 - Tty - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 (nvidia; 545.29.06) - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 Threads)

Issue description

Animations with "Call Method" tracks work normally when playing forward, but when playing backwards, a single method keyframe results in 2 method calls.

Steps to reproduce

Run the attached project. The buttons in the top left call play() and play_backwards():

func hello():
  print("hello")

func play():
  print("play")
  $AnimationPlayer.play("blah")

func play_backwards():
  print("play_backwards")
  $AnimationPlayer.play_backwards("blah")

The "blah" animation spins the sprite and calls hello() once. When playing forward, Godot prints:

play
hello

But backwards:

play_backwards
hello
hello

Minimal reproduction project (MRP)

animation-callback-test.zip

@TokageItLab
Copy link
Member

Dupe of #86147, Already fixed by #86227 in 4.2.2.

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
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

2 participants