Make collider smaller so it won't block out tiles adjacent to blocked ones.
This commit is contained in:
parent
85e24b5b45
commit
5cdcb7a4d4
|
@ -85,7 +85,7 @@ impl Viewshed {
|
||||||
);
|
);
|
||||||
let mut context: Context<u8> = Context::default();
|
let mut context: Context<u8> = Context::default();
|
||||||
let vision_distance = vision_distance::Circle::new(self.range);
|
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 mut new_visible_entities = HashSet::new();
|
||||||
let size = (
|
let size = (
|
||||||
(start.translation().x.abs() + self.range as f32) as u32,
|
(start.translation().x.abs() + self.range as f32) as u32,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user