Closed ThomasCartier closed 5 months ago
The issue only arise when I set multiple rotation angles.
with
let mut rope_joint = RopeJointBuilder::new()
.local_anchor1(local_zero_vec.into())
.local_anchor2(local_zero_vec.into())
.build();
rope_joint
.data
.set_limits(rapier3d::dynamics::JointAxis::Y, [0., 1.]);
the limit is properly respected at 4. What is going on ?
This was an issue with the way the joint set its limits. By setting the limits on all axes, the joint would actually consider vector![limit_x, limit_y, limit_z].magnitude()
as the joint limit (it concatenate the limits in a vector and takes the norm). In your case, that gives an effective limit of 1.73 which explains the difference you were observing.
In the next release (and thanks to #579), the rope will only consider the limit specified along the first axis (i.e. the X axis). The API has changed a bit to so you could simply specify the rope length in its constructor RopeJointBuilder::new(1.0)
.
Great news!
Hi, The limit doesn't look respected. Is it me or a bug ? Y value goes down to circa 3.26 when it should be circa 4.0:
Looks like a big drift right now:
Any idea ?