The basic idea is to use a Right, Up, Forward orthonormal vector basis system and then translate that back into XWA's yaw, pitch, roll. Then we can overwrite the ship's yaw, pitch, roll in the player's ObjectEntry slot.
The RUF system is reortho on every frame and renormalized, that way precision errors are not accumulated.
If the PlayerRUF and XWA's mobileObject orientation matrix get out of sync, the code will re-initialize PlayerRUF. This effectively makes PlayerRUF get the proper initial values.
To enable mouse support, do the following in DDraw.cfg:
The basic idea is to use a Right, Up, Forward orthonormal vector basis system and then translate that back into XWA's yaw, pitch, roll. Then we can overwrite the ship's yaw, pitch, roll in the player's ObjectEntry slot.
The RUF system is reortho on every frame and renormalized, that way precision errors are not accumulated.
If the PlayerRUF and XWA's mobileObject orientation matrix get out of sync, the code will re-initialize PlayerRUF. This effectively makes PlayerRUF get the proper initial values.
To enable mouse support, do the following in DDraw.cfg: