Prof-Butts / xwa_ddraw_d3d11

Direct3D 11 implementation of DDraw.dll for XWA with VR support and New Shaders
MIT License
6 stars 4 forks source link

Incorrect game view for large head rotations (close to 90deg) #52

Closed morallo closed 2 years ago

morallo commented 3 years ago

When pitch is close to 90 degrees, applying a yaw simultaneously translates to an incorrect view.

This is caused by a different order in the rotation axes between the decomposition of the HMD pose matrix and the application of the angles in the game engine.

We need to replace quatToEuler() with a function that asumes an intrinsic pitch-then-yaw convention

morallo commented 3 years ago

A nice illustration of the issue https://towardsdatascience.com/better-rotation-representations-for-accurate-pose-estimation-e890a7e1317f?gi=4b1e26554fbc

morallo commented 2 years ago

This was solved with Matrix multiplication based headtracking, as implemented in the new pose_corrected_headtracking mode.