bevy/crates
Horváth Bálint c285a69f76 Add the Inside version to the Collision enum (#2489)
# Objective
I think the 'collide' function inside the 'bevy/crates/bevy_sprite/src/collide_aabb.rs' file should return 'Some' if the two rectangles are fully overlapping or one is inside the other. This can happen on low-end machines when a lot of time passes between two frames because of a stutter, so a bullet for example gets inside its target. I can also think of situations where this is a valid use case even without stutters. 

## Solution
I added an 'Inside' version to the Collision enum declared in the file. And I use it, when the two rectangles are overlapping, but we can't say from which direction it happened. I gave a 'penetration depth' of minus Infinity to these cases, so that this variant only appears, when the two rectangles overlap from each side fully. I am not sure if this is the right thing to do.

Fixes #1980

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-02-01 22:40:25 +00:00
..
bevy_app Document sub apps (#3403) 2022-01-14 23:14:42 +00:00
bevy_asset Add a warning when watch_for_changes has no effect (#3684) 2022-01-21 00:29:29 +00:00
bevy_audio Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_core fix timer test to be less reliant on float precision (#3789) 2022-01-28 16:17:54 +00:00
bevy_core_pipeline Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
bevy_crevice Don't panic in macro shape validation (#3647) 2022-01-15 22:14:43 +00:00
bevy_derive Don't panic in macro shape validation (#3647) 2022-01-15 22:14:43 +00:00
bevy_diagnostic Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_dylib Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_dynamic_plugin Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_ecs Mark .id() methods which return an Entity as must_use (#3750) 2022-01-23 14:24:37 +00:00
bevy_ecs_compile_fail_tests Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_gilrs Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_gltf Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_input Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_internal Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
bevy_log Add crate level docs to bevy_log and enable #![warn(missing_docs)] (#3520) 2022-01-23 18:00:43 +00:00
bevy_macro_utils Don't panic in macro shape validation (#3647) 2022-01-15 22:14:43 +00:00
bevy_math Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_pbr bevy_pbr: Do not panic when more than 256 point lights are added the scene (#3697) 2022-01-17 22:22:15 +00:00
bevy_reflect document more of bevy_reflect (#3655) 2022-01-14 19:09:44 +00:00
bevy_render bevy_render: Only auto-disable mappable primary buffers for discrete GPUs (#3803) 2022-01-31 01:22:17 +00:00
bevy_scene Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_sprite Add the Inside version to the Collision enum (#2489) 2022-02-01 22:40:25 +00:00
bevy_tasks Document bevy_tasks and enable #![warn(missing_docs)] (#3509) 2022-01-16 04:53:22 +00:00
bevy_text Update docstrings for text_system and text2d_system (#3732) 2022-01-20 19:32:16 +00:00
bevy_transform Added docs for bevy_transform (#3516) 2022-01-14 18:47:48 +00:00
bevy_ui Update docstrings for text_system and text2d_system (#3732) 2022-01-20 19:32:16 +00:00
bevy_utils Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_window Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
bevy_winit do not set cursor grab on window creation if not asked for (#3617) 2022-01-15 20:29:58 +00:00