unity how to put collision on layer script code example
Example: unity how to make two objects not collide
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "theobjectToIgnore")
{
Physics.IgnoreCollision(theobjectToIgnore.collider, collider);
}