//detect no wall contact void OnTriggerExit2D(Collider2D noWall) { if ((noWall.gameObject.tag == "Wall")) { playerAccess.setTopCollisionOff(); } }