Save and reset old speed and gravity value