FlexibleJoint QML Type
Base type for flexible joints with configurable spring stiffness and damping. More...
| Import Statement: | import QtQuick3D.Physics |
| Since: | Qt 6.13 |
| Inherits: | |
| Inherited By: | DistanceJoint, PrismaticJoint, RevoluteJoint, and SphericalJoint |
Properties
Detailed Description
This is the abstract base type for all joints that support customizable spring stiffness and damping factors for soft constraints and joint limits.
Whether a joint limit is hard or soft, and how it behaves when soft, depends on the combination of stiffness and damping, as seen in the following table:
| stiffness | damping | Behavior |
|---|---|---|
0.0 | 0.0 | Hard constraint: the limit cannot be penetrated (the default). |
greater than 0.0 | 0.0 | Soft spring, undamped: the body bounces against the limit indefinitely. |
greater than 0.0 | greater than 0.0 | Soft spring, damped: the body bounces against the limit and settles. |
0.0 | greater than 0.0 | Soft, viscous drag only: motion is resisted, but no positional restoring force is applied. |
Note: At least one of the connected bodies needs to be dynamic.
See also FixedJoint, DistanceJoint, PrismaticJoint, RevoluteJoint, SphericalJoint, and D6Joint.
Property Documentation
damping : real [default: 0.0, since 6.13]
This property holds the energy dissipation (damping factor) for soft joint limits. See the table above for how it combines with stiffness to determine whether the limit is hard or soft.
When stiffness is greater than 0.0, this property controls how quickly oscillations around the limit boundary settle: with 0.0 (the default), no energy is lost and the body bounces indefinitely; increasing the value suppresses the bounce, though too little leaves the body oscillating before it settles, while too much makes the motion near the limit feel heavy or sluggish.
When stiffness is 0.0, this property instead applies a resistive (viscous) force with no positional restoring effect.
Range: [0, \inf)
This property was introduced in Qt 6.13.
See also stiffness, PhysicsWorld::typicalLength, and PhysicsWorld::defaultDensity.
stiffness : real [default: 0.0, since 6.13]
This property holds the spring stiffness for joint limits. See the table above for how it combines with damping to determine whether the limit is hard or soft.
When greater than 0.0, the higher the value, the stronger the restorative force pulling the body back once it crosses the limit boundary, and the less penetration is allowed before the body is pushed back. The right value depends on the mass and geometry of the connected bodies. A value that feels stiff for a light body with a short lever arm may feel soft for a heavier body or a longer lever arm, so start from a small value and increase it until the limit feels sufficiently rigid for your scene.
Range: [0, \inf)
This property was introduced in Qt 6.13.
See also damping, PhysicsWorld::typicalLength, and PhysicsWorld::defaultDensity.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.