bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Fix scene viewer animation switching

Open greeble-dev opened this issue 1 month ago • 1 comments

Objective

The scene_viewer example doesn't correctly switch between animations. It plays the new animation but also keeps playing any previous animations, so the animation graph mixes them all together.

I suspect this was accidentally broken when animation graphs were added in #11989, but I haven't confirmed.

Solution

Stop all animations and then play the new animation.

Testing

# Press enter to switch animation, or space to pause.
cargo run --example scene_viewer --features "free_camera" -- "assets/models/animated/Fox.glb"

greeble-dev avatar Nov 17 '25 16:11 greeble-dev

I ran cargo run --example scene_viewer --features "free_camera" -- "assets/models/animated/Fox.glb” with your changes and did some combinations of pressing space and enter; it does indeed look good now!

kfc35 avatar Dec 01 '25 03:12 kfc35