Correctly size zone colliders so they connect with neighbors.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-08-31 16:08:50 -05:00
parent a4fda4a41c
commit c980854663

View File

@ -215,7 +215,10 @@ fn spawn_colliders<D: 'static + Clone + Default + Send + Sync>(
}
}
for room in &map.rooms {
let shape = Collider::cuboid((room.width() / 2) as f32, (room.height() / 2) as f32);
let shape = Collider::cuboid(
(room.width() / 2) as f32 + 0.5,
(room.height() / 2) as f32 + 0.5,
);
let position =
Isometry2::new(Vector2::new(room.center().x(), room.center().y()), 0.);
let aabb = shape.raw.compute_aabb(&position);