Add the option to automatically wake-up rigid-bodies a new joint is attached to
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user