`Segment::intersects_ray` returns false-positive when the segment is zero-length
Opened this issue · 0 comments
picoHz commented
use parry2d::math::*;
use parry2d::query::{Ray, RayCast};
use parry2d::shape::Segment;
fn main() {
// never intersect each other
let ray = Ray::new(Point::new(0.0, 0.0), Vector::new(1.0, 0.0));
let segment = Segment {
a: Point::new(10.0, 10.0),
b: Point::new(10.0, 10.0),
};
// returns true
let hit = segment.intersects_ray(&Isometry::identity(), &ray, std::f32::MAX);
assert_eq!(hit, false);
}