diff --git a/src/visibility.rs b/src/visibility.rs index 36a3c57..45d8ed6 100644 --- a/src/visibility.rs +++ b/src/visibility.rs @@ -85,7 +85,7 @@ impl Viewshed { ); let mut context: Context = Context::default(); let vision_distance = vision_distance::Circle::new(self.range); - let shape = Collider::cuboid(0.5 - f32::EPSILON, 0.5 - f32::EPSILON); + let shape = Collider::cuboid(0.49, 0.49); let mut new_visible_entities = HashSet::new(); let size = ( (start.translation().x.abs() + self.range as f32) as u32, @@ -96,7 +96,7 @@ impl Viewshed { RefCell::new(Box::new(|coord: Coord| { let shape_pos = Vec2::new(coord.x as f32 + 0.5, coord.y as f32 + 0.5); // println!("Checking {:?}", shape_pos); - if start.distance(&shape_pos) > self.range as f32 + 1. { + if start.distance(&shape_pos) > self.range as f32 { // println!("Out of range"); return u8::MAX; }