Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getOrientation should not return a quaternion #6

Open
grrrwaaa opened this issue Oct 16, 2015 · 0 comments
Open

getOrientation should not return a quaternion #6

grrrwaaa opened this issue Oct 16, 2015 · 0 comments

Comments

@grrrwaaa
Copy link

It is based on NuiAccelerometerGetCurrentReading, which although it returns a vec4, actually just represents a vector (the current direction of gravity). https://msdn.microsoft.com/en-us/library/nuisensor.inuisensor.nuiaccelerometergetcurrentreading.aspx

To actually return a quat, instead of toQuat( v ) it should be:

return glm::rotation(glm::vec3(0, -1, 0), glm::vec3(v.x, v.y, v.z));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant