You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call a function from an animation player using a call method track and that function pauses the current animation, resuming the animation using animationPlayer.play() will cause that method to be called again. This will cause the animation to repeatedly call the method over and over again and the animation will not continue.
The intended behaviour (this was how it worked in 4.1.2) is that when the animation is resumed, the method will not be called again and the animation will continue as normal.
One workaround for this issue is to instead set speed_scale to 0 when you want to pause the animation and to set it back to 1 when you want to resume it.
Steps to reproduce
Create a new scene
Add an animation player and a timer as children of the root node
Add a new script to the root node
Create a method that pauses the animation player and starts the timer
Take the timeout() signal from the timer, connect it to the root node, and in that method, play the animation
Make a new animation in the animation player and set it to run on start
Add a Call Method Track to the animation and call the method in the root node somewhere in the animation
Run the game and it should cause the method you made to run repeatedly
This is an example of the code that could be written in the root node
This is an example of the animation that could be made to reproduce the issue
Tested versions
System information
Godot v4.2.1.stable.mono - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3742) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
If you call a function from an animation player using a call method track and that function pauses the current animation, resuming the animation using animationPlayer.play() will cause that method to be called again. This will cause the animation to repeatedly call the method over and over again and the animation will not continue.
The intended behaviour (this was how it worked in 4.1.2) is that when the animation is resumed, the method will not be called again and the animation will continue as normal.
One workaround for this issue is to instead set speed_scale to 0 when you want to pause the animation and to set it back to 1 when you want to resume it.
Steps to reproduce
This is an example of the code that could be written in the root node
This is an example of the animation that could be made to reproduce the issue
Minimal reproduction project (MRP)
AnimationPlayerMethodCallRepeatIssue.zip
The text was updated successfully, but these errors were encountered: