DynamicsWorld QML Type
The dynamics world. More...
|Import Statement:||import QtQuick3DPhysics|
- defaultDensity : float
- enableCCD : bool
- forceDebugView : bool
- gravity : vector3d
- running : bool
- sceneView : View3D
- typicalLength : float
- typicalSpeed : float
This is the dynamics world. This node is used to create an instance of the physics world as well as define its properties. There can only be one dynamics world. All collision nodes in the qml will get added automatically to the dynamics world.
defaultDensity : float
This property defines the default density of dynamic objects, measured in kilograms per cubic unit. This is equal to the weight of a cube with side
The default value is
0.001, corresponding to 1 g/cm³: the density of water. If your unit of measurement is meters, a good value would be
1000. Note that only positive values are allowed.
enableCCD : bool
This property enables continuous collision detection. This will reduce the risk of bodies going through other bodies at high velocities (also known as tunnelling). The default value is
forceDebugView : bool
This property enables debug drawing of all active shapes in the physics world. The default value is
gravity : vector3d
This property defines the gravity vector of the physics world. The default value is
(0, -981, 0). Set the value to
Qt.vector3d(0, -9.81, 0) if your unit of measurement is meters and you are simulating Earth gravity.
running : bool
This property starts or stops the physical simulation. The default value is
sceneView : View3D
typicalLength : float
This property defines the approximate size of objects in the simulation. This is used to estimate certain length-related tolerances. Objects much smaller or much larger than this size may not behave properly. The default value is
typicalSpeed : float
This property defines the typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep.
For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second. The default value is
© 2022 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.