aboutsummaryrefslogtreecommitdiff
path: root/examples2d/joints2.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-05-30 18:24:46 +0200
committerSébastien Crozet <developer@crozet.re>2022-05-30 18:29:18 +0200
commitab8833f275ea5576ef2c1a3039459e81fcdb6f4d (patch)
tree58704d3d5668222931a65a5e3574e14b014f06cd /examples2d/joints2.rs
parent6ce26f3818492682a8572c895264f1e63f94b9d5 (diff)
downloadrapier-ab8833f275ea5576ef2c1a3039459e81fcdb6f4d.tar.gz
rapier-ab8833f275ea5576ef2c1a3039459e81fcdb6f4d.tar.bz2
rapier-ab8833f275ea5576ef2c1a3039459e81fcdb6f4d.zip
Add the option to automatically wake-up rigid-bodies a new joint is attached to
Diffstat (limited to 'examples2d/joints2.rs')
-rw-r--r--examples2d/joints2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples2d/joints2.rs b/examples2d/joints2.rs
index 31fda33..6162589 100644
--- a/examples2d/joints2.rs
+++ b/examples2d/joints2.rs
@@ -45,7 +45,7 @@ pub fn init_world(testbed: &mut Testbed) {
if i > 0 {
let parent_handle = *body_handles.last().unwrap();
let joint = RevoluteJointBuilder::new().local_anchor2(point![0.0, shift]);
- impulse_joints.insert(parent_handle, child_handle, joint);
+ impulse_joints.insert(parent_handle, child_handle, joint, true);
}
// Horizontal joint.
@@ -53,7 +53,7 @@ pub fn init_world(testbed: &mut Testbed) {
let parent_index = body_handles.len() - numi;
let parent_handle = body_handles[parent_index];
let joint = RevoluteJointBuilder::new().local_anchor2(point![-shift, 0.0]);
- impulse_joints.insert(parent_handle, child_handle, joint);
+ impulse_joints.insert(parent_handle, child_handle, joint, true);
}
body_handles.push(child_handle);