bevy/crates
Jonathan Nilsson 0ebd7fcdf4
Visibility range takes the model aabb into acount (#15164)
# Objective

I'm building a game where i generate a set of meshes where the transform
is identity, and in each mesh the vertices are offset to where the model
is. When adding visibility ranges to the models i noticed that they only
switched when the distance to the origin changed over the threshold and
all at the same time.

## Solution

I believe that each mesh gets a Aabb generated for use with visibility
testing. So we can use that aabb to calculate a more representative
distance to the mesh.

The code to transform the aabb is taken from the visibility sysyem.

## Testing
I tested the changes locally in my project.

Would you like me to write an example or a test somewhere?
Is there any other code that uses the visibility range, that i should
also update?
2024-09-23 20:38:26 +00:00
..
bevy_a11y Reflected traits for resources and components: bevy_a11y (#15192) 2024-09-14 01:43:16 +00:00
bevy_animation Allow animation clips to animate arbitrary properties. (#15282) 2024-09-23 17:14:12 +00:00
bevy_app Support systems that take references as input (#15184) 2024-09-23 17:37:29 +00:00
bevy_asset bevy_reflect: Replace "value" terminology with "opaque" (#15240) 2024-09-23 18:04:57 +00:00
bevy_audio Reflect derived traits on all components and resources: bevy_audio (#15211) 2024-09-15 14:24:00 +00:00
bevy_color Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_core Unify crate-level preludes (#15080) 2024-09-08 17:10:57 +00:00
bevy_core_pipeline Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_derive Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_dev_tools Added HeadlessPlugins (#15203) (#15260) 2024-09-19 16:44:43 +00:00
bevy_diagnostic Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Fix system param warnings on systems that cannot run anyways (#15397) 2024-09-23 20:25:49 +00:00
bevy_encase_derive Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_gilrs Update gilrs requirement from 0.10.1 to 0.11.0 (#15245) 2024-09-16 23:34:04 +00:00
bevy_gizmos Reduce runtime panics through SystemParam validation (#15276) 2024-09-23 16:54:21 +00:00
bevy_gltf Allow animation clips to animate arbitrary properties. (#15282) 2024-09-23 17:14:12 +00:00
bevy_hierarchy Bubbling observers traversal should use query data (#15385) 2024-09-23 18:08:36 +00:00
bevy_input Use of deprecated function in example for ButtonInput (#15221) 2024-09-15 15:22:39 +00:00
bevy_internal Initial implementation of the Bevy Remote Protocol (Adopted) (#14880) 2024-09-23 18:36:16 +00:00
bevy_log Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_macro_utils Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_math Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_mikktspace Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_pbr Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_picking Bubbling observers traversal should use query data (#15385) 2024-09-23 18:08:36 +00:00
bevy_ptr Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_reflect Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_remote Initial implementation of the Bevy Remote Protocol (Adopted) (#14880) 2024-09-23 18:36:16 +00:00
bevy_render Visibility range takes the model aabb into acount (#15164) 2024-09-23 20:38:26 +00:00
bevy_scene Rename push children to add children (#15196) 2024-09-16 23:16:04 +00:00
bevy_sprite feature gate picking backends (#15369) 2024-09-22 19:35:15 +00:00
bevy_state Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_tasks Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_text Zero fontsize panic workaround (#15371) 2024-09-23 17:31:50 +00:00
bevy_time Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_transform Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_ui Add the ability to control font smoothing (#15368) 2024-09-23 17:28:25 +00:00
bevy_utils move ShortName to bevy_reflect (#15340) 2024-09-21 20:52:46 +00:00
bevy_window Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00
bevy_winit Log monitor and window information at startup in bevy_winit (#15377) 2024-09-23 17:36:16 +00:00