Check for interference (collision/contact) between two shapes.
Returns detailed proximity information including the minimum distance and closest points. Shapes are considered interfering when their minimum distance is within the given tolerance.
First shape.
Second shape.
Distance threshold below which shapes are considered interfering. Default: 1e-6.
A Result wrapping the InterferenceResult.
Result
const result = unwrap(checkInterference(boxA, boxB));if (result.hasInterference) { console.log('Collision at distance', result.minDistance);} Copy
const result = unwrap(checkInterference(boxA, boxB));if (result.hasInterference) { console.log('Collision at distance', result.minDistance);}
Check for interference (collision/contact) between two shapes.
Returns detailed proximity information including the minimum distance and closest points. Shapes are considered interfering when their minimum distance is within the given tolerance.