Qt Quick 3D Physics API Changes from Tech Preview

Starting with the Qt 6.5.0 release, the Qt Quick 3D Physics module is no longer in Tech Preview. As a result of the API feedback and review process, some source-incompatible changes were made.

The majority of the changes are renaming types and properties for consistency with other APIs and to make the names more descriptive. The most noticeable rename is changing DynamicsWorld to PhysicsWorld, which will affect all applications.

The most important behavioral change is the handling of kinematic bodies. Changing the position/orientation of a kinematic body is no longer done by using the Node properties (position, rotation, etc.), but instead by using the new properties: kinematicPosition, kinematicEulerRotation, kinematicRotation, and kinematicPivot. The reason for this change was to make sure that the visual movement of kinematic bodies is synchronized with the rest of the simulation, instead of happening one simulation step too early.

The DynamicRigidBody.density property no longer treats negative values (and zero) as a special case. Instead, there are two new massMode enumeration values replacing Density:

DefaultDensityThe density of the body is defined by PhysicsWorld.defaultDensity. This is the default.
CustomDensityThe density of the body is defined by the density property.

The enableTriggerReports property has been renamed to sendTriggerReports. In addition, physics objects can now be notified when they enter a trigger body by setting receiveTriggerReports.

The following is a complete list of all the API changes:

© 2023 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.