bevy/examples/game
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
..
alien_cake_addict.rs Do not panic on failed setting of GameOver state in AlienCakeAddict (#3411) 2021-12-22 00:49:15 +00:00
breakout.rs Add the Inside version to the Collision enum (#2489) 2022-02-01 22:40:25 +00:00
game_menu.rs Remove a couple of unnecessary full paths (#3699) 2022-01-16 20:49:40 +00:00