How can I make the collider from the points ignore the ghost but not pacman?

Hi I am currently trying to make a pacman game for a school assignment.
I have some trouble getting the ghost to ignore the white balls.
any help?
This is what I have in my ball script

	void OnCollisionStay2D(Collision2D other)
	{
		if (other.gameObject.name == "ghost")
			collider.enabled = false;
		else if (other.gameObject.name == "Pacman")
			Destroy (gameObject);
	}

25718-sample.png

There is a layer matrix for physic and physic 2d

Use layers.

Set the collider to ‘isTrigger’ on the balls, and then use OnTriggerEnter(). The balls can check to see if it is the pacman or the ghost and act appropriately. Or depending on the structure of your code, the pacman can use the OnTriggerEnter() to delete the spheres.