Qt Quick 3D Physics - Compound Shapes Example
import QtQuick
import QtQuick3D
import QtQuick3D.Physics
DynamicRigidBody {
scale: Qt.vector3d(100, 100, 100)
property color color: "white"
PrincipledMaterial {
id: _material
baseColor: color
metalness: 1.0
roughness: 0.5
}
Model {
source: "meshes/ring.mesh"
materials: [
_material
]
}
collisionShapes: [
ConvexMeshShape {
meshSource: "meshes/segmentedRing_001.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_002.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_003.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_004.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_005.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_006.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_007.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_008.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_009.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_010.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_011.mesh"
},
ConvexMeshShape {
meshSource: "meshes/segmentedRing_012.mesh"