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 doesn't call methods when they are at the end of the animation consistently #95052

Closed
decacis opened this issue Aug 2, 2024 · 1 comment · Fixed by #95023
Closed

Comments

@decacis
Copy link
Contributor

decacis commented Aug 2, 2024

Tested versions

  • Reproducible in v4.3.rc2.official [3978628]
  • NOT reproducible in v4.3.beta3.official [82cedc8]

System information

Windows 10 - Godot v4.3.rc2.official [3978628] - Compatibility

Issue description

When you add a call method key at the end of an animation, if you play the animation backwards, the method is called sometimes and sometimes not.

One workaround is to move the key just a bit. For example, if we have an animation with a duration of 1sec, moving the call method key to 0.99 will make it work consistently.

In the MRP I attached, we should get something like:

----- PRESSED BUTTON -----
>>>>> FORWARD
CALLING END METHOD
----- PRESSED BUTTON -----
<<<<< BACKWARDS
CALLING END METHOD
----- PRESSED BUTTON -----
>>>>> FORWARD
CALLING END METHOD
----- PRESSED BUTTON -----
<<<<< BACKWARDS
CALLING END METHOD

i.e. a repeating pattern, but in my case I usually get:

----- PRESSED BUTTON -----
>>>>> FORWARD
CALLING END METHOD
----- PRESSED BUTTON -----
<<<<< BACKWARDS
----- PRESSED BUTTON -----
>>>>> FORWARD
CALLING END METHOD
----- PRESSED BUTTON -----
<<<<< BACKWARDS
CALLING END METHOD
----- PRESSED BUTTON -----
>>>>> FORWARD
CALLING END METHOD
----- PRESSED BUTTON -----
<<<<< BACKWARDS
CALLING END METHOD

If you see, the second time I press the button, the method at the end of the animation is not called, but after that it works like it should again. I attached a video as well to show the issue.

Armadillo-Hidden-Edible.mp4

As I mentioned, this is not consistent. When I tried to record the issue, it worked as expected sometimes, but not always.

Steps to reproduce

  • Add an AnimationPlayer.
  • Create an animation with a call method key at the end of the animation.
  • Play the animation forwards and then backwards.

Minimal reproduction project (MRP)

animationplayercallmethoderror.zip

@decacis
Copy link
Contributor Author

decacis commented Aug 2, 2024

Maybe related to #95021 ?

Edit: just tested with #95023 and it seems to work consistently again, so I guess that was the issue.

Feel free to close the issue then!

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