r/QtGames

Good news. The Qt quick3d engine implement joints support
▲ 9 r/QtGames+1 crossposts

Good news. The Qt quick3d engine implement joints support

The QtQuick3D.Physics module (starting from version 6.12) now features support for physical joints. This allows the physics engine to natively handle constraints and connections between bodies, which is essential for achieving physically accurate skin behavior, complex skeletal rigs, and natural ragdoll physics in games.

Core Architecture

All new joint types inherit from an abstract base type: PhysicsJoint.

Key rules of PhysicsJoint

  • Connects two bodies: bodyA and bodyB. If one body is left unassigned (null), the joint automatically anchors to the static world space.
  • Strict Requirement: At least one of the connected bodies must be dynamic.
  • Scene registration and lifecycle management are handled automatically behind the scenes via QPhysicsWorld::registerJoint() and deregisterJoint().
  • Local positioning and rotation relative to each body's frame are configured using:
    • positionA / positionB (vector3d)
    • orientationA / orientationB (quaternion)

Available Joint Types

Five specialized joint types have been introduced to handle specific constraints:

1. FixedJoint

Locks the relative position and orientation between two bodies completely. Perfect for composite objects or breakable structures.

2. DistanceJoint

Maintains the origins of the joint within a specified distance range.

  • minDistance — The lower bound of the constraint.
  • maxDistance — The upper bound of the constraint.

3. PrismaticJoint

Permits relative translational (linear) movement along a single axis (the local X-axis of the joint frame) while completely blocking relative rotation.

  • lowerLimit — Maximum translation along the negative X-axis.
  • upperLimit — Maximum translation along the positive X-axis.

4. RevoluteJoint

Commonly referred to as a hinge. It keeps the origins and X-axes of the frames aligned, allowing free rotation exclusively around this shared axis.

  • enableAngularLimit — Toggles the angular constraint (default is false).
  • angularLimitLower / angularLimitUpper — Lower and upper rotation limits specified in radians.

5. SphericalJoint

Also known as a ball-and-socket joint. It keeps the origins locked together but allows the orientations to vary freely (e.g., a shoulder or hip joint).

  • enableConeLimit — Toggles the cone limit constraint (default is false).
  • coneLimitY / coneLimitZ — Angular limits for the cone constraint specified in radians.

Key Takeaways for Developers

  • Natural Skins & Ragdolls: Essential for character physics, secondary clothing motion, and lifelike skeletal simulations.
  • Mechanical Simulation: Simplifies the implementation of vehicles, doors, levers, and suspension systems.
  • Tooling Support: The update includes built-in tests and dedicated Design Studio QML files, enabling visual setup and prototyping.
u/LetterheadTall8085 — 1 day ago