Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Created March 7, 2019 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristophHaag/0fc177745baa00e4095ad22dd1b49043 to your computer and use it in GitHub Desktop.
Save ChristophHaag/0fc177745baa00e4095ad22dd1b49043 to your computer and use it in GitHub Desktop.
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