closest_points panics when a Cylinder & Trimesh are not within max_dist
mijalk0 opened this issue · 1 comments
mijalk0 commented
closest_points
panics when a Cylinder
and Trimesh
are tested and the objects are not within max_dist
of each other. I believe the function is actually supposed to return Disjoint
instead. Here is a specific example I've found:
use parry3d::{math::*, query, shape::*};
fn main() {
let cylinder = Cylinder::new(0.5, 1.0);
let vertices = vec![
Point::new(1.0, -1.0, 0.0),
Point::new(-1.0, -1.0, 0.0),
Point::new(0.0, -1.0, 1.0),
];
let indices = vec![[0, 1, 2]];
let trimesh = TriMesh::new(vertices, indices);
// let max_dist = 0.5; // Fine
let max_dist = 0.49; // Panics
let _ = query::closest_points(
&Isometry::identity(),
cylinder.clone_box().as_ref(),
&Isometry::identity(),
trimesh.clone_box().as_ref(),
max_dist,
);
}
hunterZh37 commented
Same error here. For me, closest_points panics when two shapes are not within 1.0 unit distance of each other. I have gotten a "Composite shapes must not be empty" error. I have double-checked that my inputs are not indeed empty, but still getting the same error.