Answers for "on collision enter by layer 2d unity"

C#
0

on collision enter by layer 2d unity

void OnCollisionEnter(Collision collision)
     {
         if (collision.gameObject.layer == 8/*the layer number*/ )
             debug.log(collision.gameObject.layer.number.ToString() "touched")
	}
Posted by: Guest on October-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language