The Prophet ﷺ used to plant a spear in the ground and then pray facing it.
أخبرنا عبيد الله بن سعيد قال حدثنا يحيى عن عبيد الله قال أنبأنا نافع
عن النبي ﷺ قال كان يركز الحربة ثم يصلي إليها
Bukhari transmitted it in the Book of Prayer, chapter on praying toward a spear, hadith no. 498, from the hadith of Yahya Qattan. Muslim also transmitted it in the Book of Prayer, chapter on the sutrah of the one praying and the encouragement to pray... etc., hadith no. 246/501, from the hadith of Ubaydullah bin Umar, with the same wording. It is also found in Kubra, hadith no. 822.