//detect wall collision void OnTriggerStay2D(Collider2D hitWall) { if ((hitWall.gameObject.tag == "Wall")) { playerAccess.setBottomCollision(); } }