IEnumerator RecordBaseHeight() { yield return new WaitForSeconds(0.5f); baseHeight = BodyRB.position.y; //Debug.Log("Base height is " + baseHeight); }