Additional PinSlotJoint 2D implementation with DOF: 1 translation + 1 rotation (#775)

* Additional groove joint 2D implementation with 1 translation + 1 rotation

* Conditional import for 2d feature flag

* Groove joint 2d tests in testbed examples

* Renamed GrooveJoint to PinSlotJoint

* cargo fmt

* Cross-reference to groove joint in Godot engine
This commit is contained in:
legendofa
2025-11-14 19:00:36 +09:00
committed by GitHub
parent eb62d2f5c7
commit 5f687b0d29
5 changed files with 368 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ bitflags::bitflags! {
const LOCKED_REVOLUTE_AXES = Self::LIN_X.bits() | Self::LIN_Y.bits();
/// The set of degrees of freedom locked by a prismatic joint.
const LOCKED_PRISMATIC_AXES = Self::LIN_Y.bits() | Self::ANG_X.bits();
/// The set of degrees of freedom locked by a pin slot joint.
const LOCKED_PIN_SLOT_AXES = Self::LIN_Y.bits();
/// The set of degrees of freedom locked by a fixed joint.
const LOCKED_FIXED_AXES = Self::LIN_X.bits() | Self::LIN_Y.bits() | Self::ANG_X.bits();
/// The set of degrees of freedom left free by a revolute joint.