Skip to content

Commit

Permalink
add warn! call
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Nov 19, 2024
1 parent 4731852 commit a7f8dce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/query/contact/contact_support_map_support_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::query::gjk::{self, CSOPoint, GJKResult, VoronoiSimplex};
use crate::query::Contact;
use crate::shape::SupportMap;

use log::warn;
use na::Unit;

/// Contact between support-mapped shapes (`Cuboid`, `ConvexHull`, etc.)
Expand All @@ -25,7 +26,10 @@ where
let normal2 = pos12.inverse_transform_unit_vector(&-normal1);
Some(Contact::new(point1, point2, normal1, normal2, dist))
}
GJKResult::ClosestPoints(_, _, Err(_)) => None,
GJKResult::ClosestPoints(_, _, Err(_)) => {
warn!("`contact_support_map_support_map` found the closest points on a degenerate face: verify your shapes' correctness.");
None
}
GJKResult::NoIntersection(_) => None,
GJKResult::Intersection => unreachable!(),
GJKResult::Proximity(_) => unreachable!(),
Expand Down

0 comments on commit a7f8dce

Please sign in to comment.