Problem with detecting the layer colours when using the raycast


I have some boxes. when I pick a point over the white box , I need to detect the all boxes colour below the picked point.

In my code when I pick a point over the white box I just get the all boxes colour but I want to get the colour of the boxes which are exactly below the picked point.
is it possible help me know how can I solve this problem?
here is my PG :

I do not think it is possible to do that with SPS at the moment. @jerome might know ?

But currently you only retrieve the first hit point on the SPS mesh.

1 Like

My approach would be :

  • detect the ray hit point on the SPS
  • deduct from the SPS mesh hit facet what solid particle within the SPS is hit (might be done easily by enabling facetData on the SPS mesh)
  • get this particle color
1 Like