aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/spawn/sphere.qml
blob: b8f6bbc7abe4ca4e2ff5581aec34df16888ad4e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
import QtQuick3D.Physics

DynamicRigidBody {
    property bool inArea: false
    mass: 10
    position: Qt.vector3d(1, 2, 0)

    sendContactReports: true
    sendTriggerReports: true

    Model {
        source: "#Sphere"
        materials: PrincipledMaterial {
            baseColor: inArea ? "blue" : "red"
        }
        scale: Qt.vector3d(0.01, 0.01, 0.01)
    }

    collisionShapes: SphereShape {
        diameter: 1
    }
}