Split rigid-bodies and colliders into multiple components

This commit is contained in:
Crozet Sébastien
2021-04-26 17:59:25 +02:00
parent aaf80bfa87
commit c32da78f2a
91 changed files with 5969 additions and 3653 deletions

View File

@@ -61,9 +61,12 @@ pub fn init_world(testbed: &mut Testbed) {
let num_to_remove = to_remove.len() - MAX_NUMBER_OF_BODIES;
for (handle, _) in &to_remove[..num_to_remove] {
physics
.bodies
.remove(*handle, &mut physics.colliders, &mut physics.joints);
physics.bodies.remove(
*handle,
&mut physics.islands,
&mut physics.colliders,
&mut physics.joints,
);
if let (Some(graphics), Some(window)) = (&mut graphics, &mut window) {
graphics.remove_body_nodes(window, *handle);