- Qt 6.10
- Qt Quick 3D Physics
- Qt Quick 3D Physics API Changes from Tech Preview
- Qt Quick 3D Physics | Commercial or GPLv3

Cooking

# 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`:

`DefaultDensity` | The density of the body is defined by PhysicsWorld.defaultDensity. This is the default.
`CustomDensity` | The 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:

- CollisionShape:
  - renamed enableDebugView to enableDebugDraw
- Renamed the abstract base type `CollisionNode` to PhysicsNode
  - changed enableTriggerReports to sendTriggerReports and receiveTriggerReports
- CharacterController
  - renamed `speed` to movement
- ConvexMeshShape
  - renamed `meshSource` to source
- HeightFieldShape
  - renamed `heightMap` to source
- TriangleMeshShape
  - renamed `meshSource` to source
- PhysicsWorld (renamed from `DynamicsWorld`)
  - renamed `forceDebugView` to forceDebugDraw
  - renamed `minTimestep`/`maxTimestep` to minimumTimestep/maximumTimestep
  - removed sceneNode
  - added scene
  - added viewport
- DynamicRigidBody
  - changed the `axisLockLinearX/Y/Z` properties into a single property linearAxisLock that takes a bitfield
  - changed the `axisLockAngularX/Y/Z` properties into a single property angularAxisLock that takes a bitfield
  - added new properties kinematicPosition, kinematicEulerRotation, kinematicRotation, and kinematicPivot
  - changed `Density` enum value to DefaultDensity/CustomDensity and removed special-casing of negative values.
  - replaced the `linearVelocity` property with the method setLinearVelocity.
  - replaced the `angularVelocity` property with the method setAngularVelocity.

Cooking