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

@@ -277,7 +277,7 @@ impl ParallelIslandSolver {
rb.linvel += dvel.linear;
rb.angvel += rb.effective_world_inv_inertia_sqrt.transform_vector(dvel.angular);
rb.integrate(params.dt);
positions[rb.active_set_offset] = rb.position;
positions[rb.active_set_offset] = rb.next_position;
}
}
@@ -298,7 +298,7 @@ impl ParallelIslandSolver {
let batch_size = thread.batch_size;
for handle in active_bodies[thread.position_writeback_index] {
let rb = &mut bodies[handle.0];
rb.set_position_internal(positions[rb.active_set_offset]);
rb.set_next_position(positions[rb.active_set_offset]);
}
}
})