-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add animation_looped
signal to AnimationMixer
#89525
base: master
Are you sure you want to change the base?
Add animation_looped
signal to AnimationMixer
#89525
Conversation
11647ee
to
3a23f3e
Compare
I tried building from this PR but whenever I open a blank new project it only opens 50% of the time. The other 50% of the time it will immediately crash to desktop upon opening with the following logged to the console. It does not matter if the project is Forward+ or Compatibility. The project will crash 50% of the time either way.
On another launch attempt in --verbose I found this warning in the logs. Not sure if this is helpful or not.
On another launch attempt without --verbose I got this when it crashed
If this is helpful here is my dotnet --info
|
@valkyrienyanko Given the That said, Vulkan isn't being initialized at all when you open the project manager1 or when you open a project that uses the Compatibility rendering method. Can you reproduce this with a non-.NET build? Footnotes
|
The signal has two parameters: the animation name, and a boolean that is `true` if the looping barrier was crossed backwards (which occurs when playing backwards or with ping-pong looping), `false` otherwise. This is available in both AnimationPlayer and AnimationTree. In AnimationTree, this is implemented in AnimationNodeAnimation.
3a23f3e
to
bce985a
Compare
Rebased and tested again, it mostly works as expected.
I've tried applying the same to AnimationPlayer, but it doesn't seem to be working (try an AnimationPlayer with a playback speed scale of |
I've been asked several times that the combination of negative timescale and play() in AnimationPlayer is certainly a bit confusing. Perhaps we need to hide the from_end argument and make it consistent so that the starting position changes depending on the final timescale? |
Getting signals from looping animations would be a boon! Would this also emit when a looping animation is entered for the first time? |
No, it only emits after it loops once. If you control the animation startup yourself in a script, then you already know when the animation started (unless it was queued, but this may be better suited to its own signal). |
Thanks! |
I don't plan to work on adding more animation signals for now, so I don't have an ETA for this. Also, adding more signals should be discussed in a proposal first. |
The signal has two parameters: the animation name, and a boolean that is
true
if the looping barrier was crossed backwards (which occurs when playing backwards or with ping-pong looping),false
otherwise.This is available in both AnimationPlayer and AnimationTree. In AnimationTree, this is implemented in AnimationNodeAnimation.
For reference, AnimatedSprite2D/3D have similar signals available, although they don't have an
anim_name
andbackwards
parameters.Testing project: test_animation_looped_signal.zip