Created
March 7, 2019 02:05
-
-
Save ChristophHaag/0fc177745baa00e4095ad22dd1b49043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/openhmd.c b/src/openhmd.c | |
index e500be5..727d67a 100644 | |
--- a/src/openhmd.c | |
+++ b/src/openhmd.c | |
@@ -289,7 +289,7 @@ static int ohmd_device_getf_unp(ohmd_device* device, ohmd_float_value type, floa | |
mat4x4f orient, world_shift, result; | |
omat4x4f_init_look_at(&orient, &rot, &point); | |
omat4x4f_init_translate(&world_shift, -device->position.x +(device->properties.ipd / 2.0f), -device->position.y, -device->position.z); | |
- omat4x4f_mult(&orient, &world_shift, &result); | |
+ omat4x4f_mult(&world_shift, &orient, &result); | |
omat4x4f_transpose(&result, (mat4x4f*)out); | |
return OHMD_S_OK; | |
} | |
@@ -300,7 +300,7 @@ static int ohmd_device_getf_unp(ohmd_device* device, ohmd_float_value type, floa | |
mat4x4f orient, world_shift, result; | |
omat4x4f_init_look_at(&orient, &rot, &point); | |
omat4x4f_init_translate(&world_shift, -device->position.x + -(device->properties.ipd / 2.0f), -device->position.y, -device->position.z); | |
- omat4x4f_mult(&orient, &world_shift, &result); | |
+ omat4x4f_mult(&world_shift, &orient, &result); | |
omat4x4f_transpose(&result, (mat4x4f*)out); | |
return OHMD_S_OK; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment