I want to ignore collision between two objects for my 2D game.
In 3D game, I used following statement to ignore collision
public Transform target; //Middle parent joint
void Start()
{
// to prevent collision with the middle sphere collider
Physics.IgnoreCollision(target.collider, collider);
}
But now I have BoxCollider2D and Physics2D class. So what is the way to ignore collision?
↧