First working version of non-linear CCD based on single-substep motion-clamping.

This commit is contained in:
Crozet Sébastien
2021-03-26 18:16:27 +01:00
parent 326469a1df
commit 97157c9423
29 changed files with 696 additions and 109 deletions

View File

@@ -108,8 +108,8 @@ impl ColliderSet {
let parent = bodies
.get_mut(parent_handle)
.expect("Parent rigid body not found.");
coll.prev_position = parent.position * coll.delta;
coll.position = parent.position * coll.delta;
coll.predicted_position = parent.predicted_position * coll.delta;
let handle = ColliderHandle(self.colliders.insert(coll));
let coll = self.colliders.get(handle.0).unwrap();
parent.add_collider(handle, &coll);