Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128266

Add a read only property "velocity" to DynamicRigidBody QML type

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.9
    • Quick: 3D Physics
    • 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}

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            nick_bennett Nicholas Bennett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes