On traveling, `Abdullah bin `Umar used to offer the prayer on his Mount by signs whatever direction it took. `Abdullah said that the Prophet (ﷺ) used to do so.
Sahih al-Bukhari Book 18, Hadith 16