Make collider smaller so it won't block out tiles adjacent to blocked ones.

This commit is contained in:
Nolan Darilek 2022-08-04 15:29:50 -05:00
parent 85e24b5b45
commit 5cdcb7a4d4

View File

@ -85,7 +85,7 @@ impl Viewshed {
);
let mut context: Context<u8> = Context::default();
let vision_distance = vision_distance::Circle::new(self.range);
let shape = Collider::cuboid(0.5, 0.5);
let shape = Collider::cuboid(0.5 - f32::EPSILON, 0.5 - f32::EPSILON);
let mut new_visible_entities = HashSet::new();
let size = (
(start.translation().x.abs() + self.range as f32) as u32,