Hello,
I have a background layer which takes all my camera background. In front of it I put some obstacles. I would like to add a pointer which only shows when the mouse is over the background part but not an obstacle. I send a Raycast2D only on the background layer, but since my background is also behind the obstacles, the raycast hits everywhere
So I thought of 2 solutions
- Cast a RaycastAll and if the length is > 1, then I know there is an obstacle in front of the background
- Rework the background to not make it go behind the obstacles.
Those two solutions don’t seems to be the best. I’m sure there is something better but I don’t see it.
Do you have an idea ?