From d7db29cee86edbab79731ad2189a078e47cc5f34 Mon Sep 17 00:00:00 2001 From: Martin Indra Date: Mon, 9 Oct 2023 20:34:01 +0200 Subject: [PATCH] Possible fix --- crates/pathing/src/interval.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/pathing/src/interval.rs b/crates/pathing/src/interval.rs index bc1fe46bf..fab4e9142 100644 --- a/crates/pathing/src/interval.rs +++ b/crates/pathing/src/interval.rs @@ -140,7 +140,9 @@ impl SegmentInterval { let b = RayProjection::calculate(ray_b, target); let side = which_side(ray_a.origin, ray_a.point_at(1.), ray_b.point_at(1.)); - debug_assert!(side != Side::Straight || ray_a.dir.dot(&ray_b.dir) < 0.); + // TODO: for some reason this assert fails due to the ray origin and + // self.segment lying on a line. + // debug_assert!(side != Side::Straight || ray_a.dir.dot(&ray_b.dir) < 0.); SegmentProjection::new(a, b, side) }