What’s the best way to have screen-space UI elements block raycasts to the 3D game world?
I am using a 3D camera and rigidbody.raycastFirst() to detect interactions with 3D objects in the scene.
I have a game HUD that uses this.entity.element.on(“click”, this._someClickMethod, this); to detect clicks on the UI elements/buttons.
However, the player is able to trigger both at the same time if the HUD element and 3D element overlap each other.
I need a way for the UI to block physics raycasts I guess?