If soldiers pray on their riding beasts during extreme fear, they are legally required to face the Qiblah at all times, even if they must turn their mounts.

The Fear Prayer: Method and Rulings for the Two Groups