Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.4.0 Beta2
-
None
-
(Qt for Python)
Qt 6.4
PySide 6.3.1
Windows 10 64bit
PC: Ryzen 5 4600H, GTX 1650Ti, 16GB DDR4
-
-
2022 Qt Quick 3D: Week 49
Description
I would like to use 2D elements (i.e. Text or Rectangle) in a 3D view. Unfortunately, there is a problem with them. When the rotation of the Text matches the user's camera (rotation: userCamera.rotation), so that it is always visible to the user, object picking does not work, or only works in undefined camera positions. When I turn off the visibility of the Text, selecting objects works fine.
EXAMPLE:
Now I can't pick lines / points (change their color):
When I turn off the visibility of the text, there is no problem with this:
But for example, in this camera position and text turned ON, object selection also works:
Code:
Cube points:
Repeater3D { id: repPktCube model: [[400, 0, 0], [500, 0, 0], [400, 100, 0], [500, 100, 0], [400, 0, 100], [500, 0, 100], [400, 100, 100], [500, 100, 100]] Model { id: modelPktCube visible: cbPts.checked source: "#Cube" objectName: "Cube" scale: Qt.vector3d(0.1, 0.1, 0.1) position: Qt.vector3d(repPktCube.model[index][0], repPktCube.model[index][1], repPktCube.model[index][2]) materials: DefaultMaterial { diffuseColor: modelPktCube.isPicked ? "violet" : "black" } pickable: true property bool isPicked: false } }
2D Text that rotates to user:
Node {
position: Qt.vector3d(200, 100, 0)
rotation: userCamera.rotation
Text {
text: 'Txt'
visible: cbTxt.checked
}
}
Picking is copied from Picking example https://doc.qt.io/qt-6/qtquick3d-picking-example.html
Attachments
Issue Links
- relates to
-
QTBUG-96457 "infinite plane" Item2D prevents event propagation to 2D content behind it
- Closed