Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity raycast all layers except one

RaycastHit hit = Physics2D.Raycast(position, direction,
                  	range, ~(1 << LayerMask.NameToLayer("Player"))))
 
PREVIOUS NEXT
Tagged: #unity #raycast #layers
ADD COMMENT
Topic
Name
6+8 =