update speed and jump height