mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
d99053cc8a
# Objective - Fixes #10587, where the `Aabb` component of entities with `Sprite` and `Handle<Image>` components was not automatically updated when `Sprite::custom_size` changed. ## Solution - In the query for entities with `Sprite` components in `calculate_bounds_2d`, use the `Changed` filter to detect for `Sprites` that changed as well as sprites that do not have `Aabb` components. As noted in the issue, this will cause the `Aabb` to be recalculated when other fields of the `Sprite` component change, but calculating the `Aabb` for sprites is trivial. --- ## Changelog - Modified query for entities with `Sprite` components in `calculate_bounds_2d`, so that entities with `Sprite` components that changed will also have their AABB recalculated. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |