Tag Archives: LayerMask

Unity – Raycast LayerMask Exposed in Editor

      Comments Off on Unity – Raycast LayerMask Exposed in Editor

Dealing with raycast layer masks can be a bit of a hassle. Relying on hardcoded layermask numbers or names, bit shifting to get the behavior you expect; it can lead to some bad spaghetti code if you’re not careful. Single layer mask: Multiple masks: Thankfully, the Unity Editor has a… Read more »