1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 20:43:35 +00:00

Fix OpenXR view matrix;

This commit is contained in:
bjorn 2020-10-12 16:39:56 -06:00
parent 25d7319605
commit c6b4981389

View file

@ -803,7 +803,7 @@ static void openxr_renderTo(void (*callback)(void*), void* userdata) {
float viewMatrix[16]; float viewMatrix[16];
XrView* view = &views[eye]; XrView* view = &views[eye];
mat4_fromQuat(viewMatrix, &view->pose.orientation.x); mat4_fromQuat(viewMatrix, &view->pose.orientation.x);
memcpy(viewMatrix, &view->pose.position.x, 3 * sizeof(float)); memcpy(viewMatrix + 12, &view->pose.position.x, 3 * sizeof(float));
mat4_invert(viewMatrix); mat4_invert(viewMatrix);
lovrGraphicsSetViewMatrix(eye, viewMatrix); lovrGraphicsSetViewMatrix(eye, viewMatrix);