Draw visibility collider lines through coordinate centers to hopefully address seeing through walls.

This commit is contained in:
Nolan Darilek 2021-09-22 08:36:38 -05:00
parent a59f8a22a1
commit 52e314ce1c

View File

@ -170,7 +170,10 @@ fn viewshed_changed(
let translation = position.position.translation;
let mut points = vec![];
for p in &viewshed.visible_points {
points.push(point!(p.x() - translation.x, p.y() - translation.y));
points.push(point!(
p.x() - translation.x + 0.5,
p.y() - translation.y + 0.5
));
}
if let Some(shape) = ColliderShape::convex_hull(&points) {
if let (Some(mut collider_shape), Some(mut collider_position)) =