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

@@ -31,9 +31,12 @@ pub fn init_world(testbed: &mut Testbed) {
.map(|e| e.0)
.collect();
for handle in 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);