Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QT3D: Problem with picking mouse events from Item3D objects
Forum Updated to NodeBB v4.3 + New Features

QT3D: Problem with picking mouse events from Item3D objects

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jqtwriter
    wrote on last edited by
    #1

    I have noticed that there is probably a bug in QT3D QtQuick Viewport element.
    My simple application consists of Viewport and some Item3D elements (with 3ds meshes):

    @import QtQuick 2.2
    import Qt3D 2.0
    import Qt3D.Shapes 2.0

    Rectangle {
    id: root
    color: "black"
    width: 800
    height: 480

    Viewport {
        id: view
        width: 800; height: 480
        blending: true
    
        navigation: true
        picking: true
    
        camera: Camera {
            id: viewCamera
            eye: Qt.vector3d(550,550,550)
        }
    

    Mesh { id: main_mesh; source: "meshes/object_main.3ds" }
    Mesh { id: first_mesh; source: "meshes/test.3ds" }

    Item3D { mesh: main_mesh; onClicked: console.log("Main object clicked") }
    Item3D { mesh: first_mesh; onClicked: console.log("First object clicked") }

    }
    

    }
    @

    Item3D objects should react on mouse events.
    This works fine when I don't use mouse navigation (that is active in Viewport element).
    When I start zooming the view and rotating using mouse and next try to click on each object, there are some areas on the objects where the clicking is not detected.
    It looks like mouse event areas on the objects are not changed properly (or maybe are unchanged) during navigation the Viewport.
    I tried the same for the QT3D demo robo_bounce application and it has the same behaviour.

    Could somebody tell me if this is really a bug ?
    If yes could somebody point me what part of Qt3D source code is responsible for this behaviour ?
    I am thinking of fixing this, so if you point me where to look for the reason it will be very useful.

    Thanks

    1 Reply Last reply
    0
    • E Offline
      E Offline
      eduard9119
      wrote on last edited by
      #2

      Can anyone explain how to use picking in qt3d 2.0 with the scene3d instead of viewport? As far as i know there is no property called 'picking'.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved