Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtquick3dphysics-changes-6-5.qdoc
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
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
8
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.
11
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.
15
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.
23
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:
27\table
28\row
29 \li \c DefaultDensity
30 \li The density of the body is defined by \l{PhysicsWorld::defaultDensity}{PhysicsWorld.defaultDensity}. This is the default.
31\row
32 \li \c CustomDensity
33 \li The density of the body is defined by the \l{DynamicRigidBody::}{density} property.
34\endtable
35
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}.
38
39The following is a complete list of all the API changes:
40
41\list
42
43\li CollisionShape:
44\list
45 \li renamed enableDebugView to \l{CollisionShape::}{enableDebugDraw}
46\endlist
47
48\li Renamed the abstract base type \c CollisionNode to \l PhysicsNode
49\list
50 \li changed enableTriggerReports to \l{PhysicsNode::}{sendTriggerReports} and \l{PhysicsNode::}{receiveTriggerReports}
51\endlist
52
53\li \l CharacterController
54\list
55 \li renamed \c speed to \l{CharacterController::}{movement}
56\endlist
57
58\li \l ConvexMeshShape
59\list
60 \li renamed \c meshSource to \l{ConvexMeshShape::}{source}
61\endlist
62
63\li \l HeightFieldShape
64\list
65 \li renamed \c heightMap to \l{HeightFieldShape::}{source}
66\endlist
67
68\li \l TriangleMeshShape
69\list
70 \li renamed \c meshSource to \l{TriangleMeshShape::}{source}
71\endlist
72
73\li \l PhysicsWorld (renamed from \c DynamicsWorld)
74\list
75 \li renamed \c{forceDebugView} to \l{PhysicsWorld::}{forceDebugDraw}
76 \li renamed \c{minTimestep}/\c{maxTimestep} to \l{PhysicsWorld::}{minimumTimestep}/\l{PhysicsWorld::}{maximumTimestep}
77 \li removed sceneNode
78 \li added \l{PhysicsWorld::}{scene}
79 \li added \l{PhysicsWorld::}{viewport}
80\endlist
81
82\li \l DynamicRigidBody
83\list
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}.
90\endlist
91
92\endlist
93
94*/