Answers for "unity raycast all layers except 2"

C#
1

unity raycast all layers except one

RaycastHit hit = Physics2D.Raycast(position, direction,
                  	range, ~(1 << LayerMask.NameToLayer("Player"))))
Posted by: Guest on June-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language