react-xr icon indicating copy to clipboard operation
react-xr copied to clipboard

[Question]: Disable ray through object

Open JenniferFalkenstein opened this issue 1 year ago • 1 comments

Hi there,

I have a Plane and a Cube (and light). The Cube is placed behind the Plane and is wrapped within an <Interact /> Element, while the Plane doesn't do anything. Every time the Cube gets selected it changes the color of the light into another color.

Now I noticed that even if the Plane is in front of the Cube, the ray still goes through the Plane and therefore is able to select the Cube behind, which is not what I want. The Plane should actually block the ray, so the player won't be able to click the Cube behind.

Is there some kind of prop I have to set or is there another way to accomplish this? 😄

JenniferFalkenstein avatar Dec 21 '22 14:12 JenniferFalkenstein