Run the position solver after the CCD motion clamping.

This commit is contained in:
Crozet Sébastien
2021-03-30 17:11:52 +02:00
parent d2ee642053
commit 88933bd431
6 changed files with 142 additions and 98 deletions

View File

@@ -624,19 +624,17 @@ impl GraphicsManager {
// );
for (_, ns) in self.b2sn.iter_mut() {
for n in ns.iter_mut() {
/*
if let Some(co) = colliders.get(n.collider()) {
let bo = &bodies[co.parent()];
if bo.is_dynamic() {
if bo.is_sleeping() {
n.set_color(Point3::new(1.0, 0.0, 0.0));
} else {
n.set_color(Point3::new(0.0, 1.0, 0.0));
}
}
}
*/
// if let Some(co) = colliders.get(n.collider()) {
// let bo = &_bodies[co.parent()];
//
// if bo.is_dynamic() {
// if bo.is_ccd_active() {
// n.set_color(Point3::new(1.0, 0.0, 0.0));
// } else {
// n.set_color(Point3::new(0.0, 1.0, 0.0));
// }
// }
// }
n.update(colliders);
n.draw(window);