aboutsummaryrefslogtreecommitdiff
path: root/examples2d/add_remove2.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-05-01 10:17:23 +0200
committerGitHub <noreply@github.com>2021-05-01 10:17:23 +0200
commita385efc5582c7918f11c01a2b6bf26a46919d3a0 (patch)
treec5b9c5e6fcb5561421e2b4b9d99f28e4c83c745e /examples2d/add_remove2.rs
parentaaf80bfa872c6f29b248cab8eb5658ab0d73cb4a (diff)
parent2dfbd9ae92c139e306afc87994adac82489f30eb (diff)
downloadrapier-a385efc5582c7918f11c01a2b6bf26a46919d3a0.tar.gz
rapier-a385efc5582c7918f11c01a2b6bf26a46919d3a0.tar.bz2
rapier-a385efc5582c7918f11c01a2b6bf26a46919d3a0.zip
Merge pull request #183 from dimforge/bundles
Make Rapier accept any kind of data storage instead of RigidBodySet/ColliderSet
Diffstat (limited to 'examples2d/add_remove2.rs')
-rw-r--r--examples2d/add_remove2.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples2d/add_remove2.rs b/examples2d/add_remove2.rs
index 0aeffbe..826d5c9 100644
--- a/examples2d/add_remove2.rs
+++ b/examples2d/add_remove2.rs
@@ -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);