- Home /
Question by
FedericoCara · May 19, 2018 at 07:31 PM ·
raycastphysics2dcollider2d
Physics 2d raycaster from EventSystems for overlapped colliders
Hi, I'm trying to use OnPointerEnter from the EventSystems, with the Physics2DRaycaster attached to the camera. The problem is that when 2 objects are overlapped, one is always in front of the other and doesn't allow the OnPointerEnter event to trigger for the one on the back. Normally this is the expected behaviour, but in my case I need the event to trigger on BOTH objects separately. Is there any workaround for this? The layer masks only allow to ignore one or other of the objects, so it's not a solution.
Comment