I see the development document of QML, that is said "The signals pressed(), released(), clicked(), moved(), entered(), and exited() are emitted when the bounding volume defined by the pickAttribute property intersects with a ray", how to set the "pickAttribute" to reduce "bounding volume" just match the entity's mesh boundary for emitting entered().now the "bounding volume" is like the picture:
1 Answers
The default BoundingVolume appears to be a "opposite corners of an axis aligned bounding box" where "box" appears to be a rotated cube, from https://doc.qt.io/qt-6.4/qml-qt3d-core-boundingvolume.html
That documentation documents a view
property which appears to be the "geometry that approximates the rendered mesh" mentioned in that documentation's 'Detailed Description' and which you can set to a GeometryView. A GeometryView appears to have the same interface like the corresponding Mesh.
I set up a QGeometryView (C++, not QML) for a QPlaneMesh identically to that QPlaneMesh and set that QPlaneMesh's view (QPlaneMesh inherits from QBoundingVolume) to be the QGeometryView, unfortunately QScreenRayCaster rays apparently still hit at the same default bounding box like before which can be described by the same image you posted, @LLLDaniel, thus here likely more/different things have to be done still.

- 76
- 1
- 6
-
alternatively try setting the PickingSettings pickMethod to PickingSettings::TrianglePicking, the PickingSettings are part of the RenderSettings. This now worked for me in the C++ case without a GeometryView as the BoundingVolume view. – user5588495 Nov 20 '22 at 11:18