Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
The joint code has a lot of ugly parts:
SphericalJoint
exists in 2D even though it doesn't really work since it's a 3D joint.delta_q
orp
instead ofrotation_difference
andimpulse
.AngleLimit::compute_correction
method has no comments or explanations for the angle magic it does.Solution
Fix the issues :)
I also did some other small cleanup and fixed some intra-doc links.
Migration Guide
SphericalJoint
no longer exists in 2D. UseRevoluteJoint
instead.AngleLimit
propertiesalpha
andbeta
are now namedmin
andmax
.apply_positional_correction
has been renamed toapply_positional_lagrange_update
. There is also anapply_positional_impulse
method.apply_angular_correction
has been renamed toapply_angular_lagrange_update
. There is also anapply_angular_impulse
method.compute_lagrange_update
no longer takes a slice over gradients. For that, usecompute_lagrange_update_with_gradients
.Joint::align_orientation
has been moved toAngularConstraint
.