QScreenRayCaster->addLayer(...) has no effect
-
A QScreenRayCaster is a component added to my scene = root entity.
When adding no layers to this QScreenRayCaster , only mesh on layer1 already present in my scene when adding QScreenRayCaster to that scene receives hits.
When adding a single layer, layer1, to this QScreenRayCaster, mesh on this layer1 receives hits but after exchanging it by removeLayer(layer1) and addLayer(layer2) mesh of layer2 receives no hit.
(Basically only mesh on layer1 receives hit no matter whether it has been added to the QScreenRayCaster or not.)
I tried removing the QScreenRayCaster from my scene and readding it after adding layer2 to it: this didn't help.
The same layers are used with a QLayerFilter being part of my frame graph. They work for the frame graph to show/hide meshes, but even when the framegraph hides layer1 that layer1 still receives the hits by the QScreenRayCaster.
How do I get layers working with the QScreenRayCaster ?