mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
fd32c6f0ec
# Objective The setup code in `animated_fox` uses a `done` boolean to avoid running the `play` logic repetitively. It is a common pattern, but it just work with exactly one fox, and misses an even more common pattern. When a user modifies the code to try it with several foxes, they are confused as to why it doesn't work (#8996). ## Solution The more common pattern is to use `Added<AnimationPlayer>` as a query filter. This both reduces complexity and naturally extend the setup code to handle several foxes, added at any time. |
||
---|---|---|
.. | ||
animated_fox.rs | ||
animated_transform.rs | ||
cubic_curve.rs | ||
custom_skinned_mesh.rs | ||
gltf_skinned_mesh.rs | ||
morph_targets.rs |