private void OnMouseUp() { Collider2D[] results = new Collider2D[1]; ContactFilter2D filter = new ContactFilter2D(); filter.SetLayerMask(houseLayer); coll.OverlapCollider(filter, results); if (results[0] != null && results[0].GetComponent <House>()) { House h = results[0].GetComponent <House>(); if (h.AtCapacity()) { transform.position = start; } else { h.AddPerson(this); } } }