Expose revolute joints with separate local axes#372
Merged
Conversation
sebcrozet
requested changes
May 24, 2026
Member
sebcrozet
left a comment
There was a problem hiding this comment.
Looks good, thank you. Just need a small simplification.
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a 3D
JointData.revoluteWithAxes(anchor1, anchor2, axis1, axis2)constructor for creating revolute joints whose two attached rigid-bodies use different local hinge axes.The Rust binding builds this from an existing
GenericJointBuilderwith the same locked-axis mask as a revolute joint, while settinglocal_axis1andlocal_axis2independently. The existingJointData.revolute(anchor1, anchor2, axis)path is unchanged.Why
Some engines and asset formats represent a hinge with separate local axes on each body. Those axes can differ in local space while still describing the same world-space hinge. The current JS
revolutehelper only accepts one local axis, so consumers need this lower-level access to preserve authored joint frames.Validation
cargo fmt --check./node_modules/.bin/prettier --check src.ts/dynamics/impulse_joint.ts./builds/prepare_builds/prepare_all_projects.shcargo check -p dimforge_rapier3d