Quick update as promised...
Actually, given that I already had a functioning app, all I had to do to display the virtual hands now that the device is head-mounted was to multiply the hands MVP matrix with the 2 rotation matrices here below, -pi/2
around x
and pi
around y
:
glm::rotate(glm::mat4(1.0f), -glm::half_pi<float>(), glm::vec3(1.0f, 0.0f, 0.0f)) *
glm::rotate(glm::mat4(1.0f), glm::pi<float>(), glm::vec3(0.0f, 1.0f, 0.0f))
Thank you for caring, Alex.