#How can I determine if an animation has finished playing?

4 messages · Page 1 of 1 (latest)

gaunt remnant
#

My animation playback code is as follows. When it exceeds the duration, the action stops, and then I try to detect it by let is_playing = player.is_playing_clip(&animations.0[animation_number]);. I find that it always returns true. Is there any way to determine that it has just finished playing?

player.play_with_transition(
    animations.0[animation_number].clone_weak(),
    Duration::from_millis(250),
);```
#
if player.is_playing_clip(&animations.0[animation_number]) //always return true
#

OH, I just solved it.🙂

mental moth