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

Two axis quaternion constructor with vectors facing away #469

Closed
gaborpapp opened this issue Dec 26, 2015 · 2 comments
Closed

Two axis quaternion constructor with vectors facing away #469

gaborpapp opened this issue Dec 26, 2015 · 2 comments
Assignees
Milestone

Comments

@gaborpapp
Copy link

It seems that the quaternion constructor does not handle the special case when the two vectors are facing away from each other. Using this code:

glm::quat A = glm::quat(glm::vec3(0, 1, 0), glm::vec3(0, -1, 0));
glm::quat B = glm::rotation(glm::vec3(0, 1, 0), glm::vec3(0, -1, 0));

I get different results [0, 0, 0, 1] and [-1, 0, 0, 0]. glm::rotation gives the expected one.

@Groovounet Groovounet self-assigned this Aug 22, 2017
@Groovounet Groovounet modified the milestones: GLM 0.9.9, GLM 0.9.8 Aug 22, 2017
@Groovounet
Copy link
Member

Groovounet commented Aug 22, 2017

So it looks like there is a case where it doesn't work. I first tried:
glm::quat(glm::vec3(1, 0, 0), glm::vec3(-1, 0, 0)); and it worked fine but
glm::quat A = glm::quat(glm::vec3(0, 1, 0), glm::vec3(0, -1, 0));
Worked fine...

@Groovounet
Copy link
Member

This issue is fixed in master branch for GLM 0.9.9 release.

Thanks for contributing,
Christophe

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

No branches or pull requests

2 participants