parry icon indicating copy to clipboard operation
parry copied to clipboard

parry3d::query::contact

Open Thomaswang0822 opened this issue 10 months ago • 0 comments

For the following 2 boxes, they touch on plane x=1

use nalgebra::Vector3 as v3;

let box1 = Cuboid::new(v3::new(0.5, 0.5, 0.5));
let pos1 = Isometry3::translation(0.5, 0.5, 0.5);
let pos2 = Isometry3::translation(1.5, 0.5, 0.5);
let exp_contact = contact(&pos1, &box1, &pos2, &box1, 0.0).unwrap().unwrap();

assert!(true == false, "pt1: {:?}, pt2:{:?}", exp_contact.point1, exp_contact.point2);

They are pt1: [0.5, 0.5, 0.5], pt2:[0.5, 0.5, 0.5], definitely wrong

And normal2 is [0.0, -1.0, 0.0], which I doubt is also wrong.

Thomaswang0822 avatar Feb 15 '25 01:02 Thomaswang0822