add 'physics layer' selection to raycast?

can we request the addition of a collision layer filter for rays?

this would make it so you can select the layer to cast on,

this would avoid using X-ray, and still allow objects blocking the ray on active collision layers.

not sure I follow

So only objects on a certain collision layer can be detected by the raycast

for instance “map” could be only on one collision layer, and raycasts would detect only those not

Enemies or Players or Power Ups, etc.

(I would use it to have raycast to detect a “component layer” for assembly to ignore the physics objects)

in my system I use a rigid body with a simple physics bound, so it can be compound parented and maintain it’s collision abilities, however you can’t detect materials (or the objects themselves) that make up the children.

So each item is two items…

Collision bound object - Rigid body
Tmesh flag that copies transforms of Collision bound object -static ghost

so what I would like, is to turn off X-ray and ignore the bound item, using layers (like I am filtering collisions)

So physics bounds are on layer 8 and Tmesh are on 7 etc.

Couldn’t you use states to accomplish this?, i.e. only objects in state 7 are evaluated by the ray?