Sunan Abi Dawud Book 2, Hadith 298
The Prophet (ﷺ) led them in prayer at al-Batha', with a staff set up in front of him. (He prayed) two rak'ahs of the Zuhr prayer and two rak'ahs of the 'Asr prayer. The women and the donkeys would pass in front of the staff.
When the Messenger of Allah (ﷺ) would go out (for prayer) on the day of 'Id, he ordered to bring a lance, it was then setup in front of him and he would pray in its direction, and the people (stood) behind him. He used to do so during journey ; hence the rulers would take it (lance with them).
The Prophet (ﷺ) said: When one of you prays, he should put something in front of his face, and if he can find nothing , he should set up his staff; but if he has no staff, he should draw a line; then what passes in front of him will not harm him.