Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9
-
None
Description
I'm trying to determine if all objects in a physical simulation are at rest. (or effectively at rest) to allow the user to trigger a new event. It would be much easier if the API had a velocity property I could read for every object and if compare to 0.
See the qt dice demo app for the code needed to achieve this at the moment:
Starting a motion time-out like this:
DynamicRigidBody {
id: root
property real diceWidth: 1.9 // cm
property bool atRest: true
property bool isClose: position.length() < 100
receiveContactReports: true
sendContactReports: true
onBodyContact: (body, positions, impulses, normals) => {
motionTimeout.start()
atRest = false
....
- Timer
Unknown macro: { id}