- Home /
Question by
ailuropoda0 · Jul 23, 2021 at 05:36 AM ·
raycastlayermaskmouseover
Set LayerMask on OnMouseOver() method
Can I set LayerMask for OnMouseOver() or OnMouseEnter() method as well as Physics.Raycast()?
I would like to detect the collider which is not in 'Ignore Raycast' layer inside another collider which is in another layer by using OnMouseEnter()?
Comment
Answer by ailuropoda0 · Feb 03 at 09:48 AM
It is impossible to set layer mask in OnMouse~ methods. So I replace it with Physics.Raycast() in Update() method.