Fix velocity constraints for ball joints involving bodies with non-uniform angular inertia.
Fix #86
This commit is contained in:
@@ -196,16 +196,16 @@ fn create_ball_joints(
|
||||
};
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new(status)
|
||||
.translation(fk * shift, 0.0, fi * shift)
|
||||
.translation(fk * shift, 0.0, fi * shift * 2.0)
|
||||
.build();
|
||||
let child_handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::ball(rad).build();
|
||||
let collider = ColliderBuilder::capsule_z(rad * 1.25, rad).build();
|
||||
colliders.insert(collider, child_handle, bodies);
|
||||
|
||||
// Vertical joint.
|
||||
if i > 0 {
|
||||
let parent_handle = *body_handles.last().unwrap();
|
||||
let joint = BallJoint::new(Point3::origin(), Point3::new(0.0, 0.0, -shift));
|
||||
let joint = BallJoint::new(Point3::origin(), Point3::new(0.0, 0.0, -shift * 2.0));
|
||||
joints.insert(bodies, parent_handle, child_handle, joint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user