Answers for "unity ignore collision between two objects"

C#
0

unity ignore collision between two objects

private void OnCollisionEnter(Collision collision)
{
	if (collision.gameObject.layer == layerToIgnore)
    	Physics.IgnoreCollision(collision.gameObject.GetComponent<Collider>(), GetComponent<Collider>());
}
Posted by: Guest on June-17-2021

Code answers related to "unity ignore collision between two objects"

C# Answers by Framework

Browse Popular Code Answers by Language