Qt3D ObjectPicker hover doesn't work inside Scene3D
Solved
QML and Qt Quick
-
Hi,
I have a Qt Quick Controls application with a Scene3D type. Inside contains all the usual Qt3D standard types. However I noticed the "entered" and "exited" events of ObjectPicker only trigger when I hold down my mouse button while moving the mouse.
I have the hoverEnabled property set to true, so what is happening here? I enclosed the block of code below. Your help would be appreciated.
Thanks in advance.
ApplicationWindow { visible: true width: 640; height: 480 Scene3D { anchors.fill: parent aspects: ["input", "logic"] Entity { Camera { id: camera projectionType: CameraLens.PerspectiveProjection fieldOfView: 45 aspectRatio: 16/9 nearPlane : 0.1 farPlane : 1000.0 position: Qt.vector3d( 0.0, 0.0, -40.0 ) upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) } OrbitCameraController { camera: camera } components: [ RenderSettings { activeFrameGraph: ForwardRenderer { clearColor: Qt.rgba(0.0, 0.0, 0.0, 0.0) camera: camera } }, InputSettings { } ] PhongMaterial { id: material } SphereMesh { id: sphereMesh; radius: 1 } ObjectPicker { id: objPicker hoverEnabled: true onEntered: console.log("enter") onExited: console.log("leave") } Entity { id: sphereEntity components: [ sphereMesh, material, objPicker ] } } } }