From 0a35df13c9c05cbe49b77634337aa2fea0ceb056 Mon Sep 17 00:00:00 2001 From: William Pederzoli Date: Sun, 23 Apr 2023 21:41:21 +0200 Subject: [PATCH] =?UTF-8?q?Update=20docs=20to=20reflect=20that=20the=20sha?= =?UTF-8?q?llowest=20and=20not=20the=20deepest=20penetr=E2=80=A6=20(#8473)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective Update documentation for collide_aabb for multiple sides collisions behavior --- crates/bevy_sprite/src/collide_aabb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_sprite/src/collide_aabb.rs b/crates/bevy_sprite/src/collide_aabb.rs index 77fe3c1a2b..424189dca4 100644 --- a/crates/bevy_sprite/src/collide_aabb.rs +++ b/crates/bevy_sprite/src/collide_aabb.rs @@ -19,7 +19,7 @@ pub enum Collision { /// /// The return value is the side of `B` that `A` has collided with. [`Collision::Left`] means that /// `A` collided with `B`'s left side. [`Collision::Top`] means that `A` collided with `B`'s top side. -/// If the collision occurs on multiple sides, the side with the deepest penetration is returned. +/// If the collision occurs on multiple sides, the side with the shallowest penetration is returned. /// If all sides are involved, [`Collision::Inside`] is returned. pub fn collide(a_pos: Vec3, a_size: Vec2, b_pos: Vec3, b_size: Vec2) -> Option { let a_min = a_pos.truncate() - a_size / 2.0;