mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-25 02:01:22 +01:00
Quake's autosprites and MOH:AA's sprite imposters both orient themselves by adopting the camera's own axes, so every one of them sits parallel to the view plane. On a monitor that is indistinguishable from facing the viewer, because the screen is the view plane. In a headset it is not: turning the head swings every billboard in the level round in unison, and they visibly spin in place. They now take the direction from their own position to where the viewer actually is, built against world up so they stay upright instead of inheriting the head's roll. Head rotation no longer affects them; only moving does. Covers AutospriteDeform, and SPRITE_PARALLEL and SPRITE_PARALLEL_UPRIGHT in the sprite path - the latter being the foliage imposters that stand in for static models at a distance, which is why near foliage looked correct while distant foliage did not. Still outstanding: some foliage continues to rotate, so at least one more path orients this way. Left for when movement makes it easier to tell which effects are misbehaving and why. Autosprite2Deform is untouched: it pivots around a fixed axis for beams and rails, so it is far less sensitive to this, and changing it blind would risk breaking effects that currently look right. All of this is conditional on a VR view being active, so the flat renderer is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>