1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qtquick3dphysics-changes-6-5.html
6\title Qt Quick 3D Physics API Changes from Tech Preview
7\brief List of API changes from Tech Preview
9Starting with the Qt 6.5.0 release, the Qt Quick 3D Physics module is no longer in Tech Preview.
10As a result of the API feedback and review process, some source-incompatible changes were made.
12The majority of the changes are renaming types and properties for consistency with other APIs and
13to make the names more descriptive. The most noticeable rename is changing \c DynamicsWorld to
14\l PhysicsWorld, which will affect all applications.
16The most important behavioral change is the handling of \l{DynamicRigidBody::isKinematic}{kinematic
17bodies}. Changing the position/orientation of a kinematic body is no longer done by using the
18\l Node properties (\c position, \c rotation, etc.), but instead by using the new properties:
19\l{DynamicRigidBody::}{kinematicPosition}, \l{DynamicRigidBody::}{kinematicEulerRotation},
20\l{DynamicRigidBody::}{kinematicRotation}, and \l{DynamicRigidBody::}{kinematicPivot}. The reason for
21this change was to make sure that the visual movement of kinematic bodies is synchronized with the
22rest of the simulation, instead of happening one simulation step too early.
24The \l{DynamicRigidBody::density}{DynamicRigidBody.density} property no longer treats negative
25values (and zero) as a special case. Instead, there are two new \l{DynamicRigidBody::}{massMode}
26enumeration values replacing \c Density:
30 \li The density of the body is defined by \l{PhysicsWorld::defaultDensity}{PhysicsWorld.defaultDensity}. This is the default.
33 \li The density of the body is defined by the \l{DynamicRigidBody::}{density} property.
36The \c enableTriggerReports property has been renamed to \l{PhysicsNode::}{sendTriggerReports}. In addition,
37physics objects can now be notified when they enter a trigger body by setting \l{PhysicsNode::}{receiveTriggerReports}.
39The following is a complete list of all the API changes:
45 \li renamed enableDebugView to \l{CollisionShape::}{enableDebugDraw}
48\li Renamed the abstract base type \c CollisionNode to \l PhysicsNode
50 \li changed enableTriggerReports to \l{PhysicsNode::}{sendTriggerReports} and \l{PhysicsNode::}{receiveTriggerReports}
53\li \l CharacterController
55 \li renamed \c speed to \l{CharacterController::}{movement}
60 \li renamed \c meshSource to \l{ConvexMeshShape::}{source}
63\li \l HeightFieldShape
65 \li renamed \c heightMap to \l{HeightFieldShape::}{source}
68\li \l TriangleMeshShape
70 \li renamed \c meshSource to \l{TriangleMeshShape::}{source}
73\li \l PhysicsWorld (renamed from \c DynamicsWorld)
75 \li renamed \c{forceDebugView} to \l{PhysicsWorld::}{forceDebugDraw}
76 \li renamed \c{minTimestep}/\c{maxTimestep} to \l{PhysicsWorld::}{minimumTimestep}/\l{PhysicsWorld::}{maximumTimestep}
78 \li added \l{PhysicsWorld::}{scene}
79 \li added \l{PhysicsWorld::}{viewport}
82\li \l DynamicRigidBody
84 \li changed the \c axisLockLinearX/Y/Z properties into a single property \l{DynamicRigidBody::}{linearAxisLock} that takes a bitfield
85 \li changed the \c axisLockAngularX/Y/Z properties into a single property \l{DynamicRigidBody::}{angularAxisLock} that takes a bitfield
86 \li added new properties \l{DynamicRigidBody::}{kinematicPosition}, \l{DynamicRigidBody::}{kinematicEulerRotation}, \l{DynamicRigidBody::}{kinematicRotation}, and \l{DynamicRigidBody::}{kinematicPivot}
87 \li changed \c Density enum value to \l{DynamicRigidBody::massMode}{DefaultDensity/CustomDensity} and removed special-casing of negative values.
88 \li replaced the \c linearVelocity property with the method \l{DynamicRigidBody::}{setLinearVelocity}.
89 \li replaced the \c angularVelocity property with the method \l{DynamicRigidBody::}{setAngularVelocity}.