Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6
-
None
Description
Using the screen ray cast, the ray cast should only report hits to entities that are enabled. Disabled entities should be ignored. Currently, Qt3D will report the hit even when the entity is setEnable(false), aka disabled.
The testcase that shows this error, has two entities. Each entity has a basic cube (1.0 x 1.0 x 1.0). The entities are positioned 1.1 units away from each other on the z-axis. The camera is looking down the z-axis.
The first entity is enabled and the second one is disabled.
The QScreenRayCaster shoots the ray through the center of the screen and intersects both entities, which is correct.
Then we disable the second entity's parent and shoot another ray. Currently, in Qt 6.6, the ray still intersects both entities, even though the second entity's parent is disabled. The ray should only intersect the first entity.
I've attached a simple test program (pick_bug) that reproduces the issue.
I believe that the QBoundingVolume still exists for the disabled entity after it has been disabled.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-119251 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
519632,4 | Disable entities are excluded from picking | dev | qt/qt3d | Status: NEW | 0 | 0 |