mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
Fix Quat.lookAt
This commit is contained in:
parent
90d81bc17b
commit
874f74de04
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ glm::quat Quat::rotationBetween(const glm::vec3& v1, const glm::vec3& v2) {
|
|||
}
|
||||
|
||||
glm::quat Quat::lookAt(const glm::vec3& eye, const glm::vec3& center, const glm::vec3& up) {
|
||||
return glm::quat_cast(glm::lookAt(eye, center, up));
|
||||
return glm::inverse(glm::quat_cast(glm::lookAt(eye, center, up))); // OpenGL view matrix is inverse of our camera matrix.
|
||||
}
|
||||
|
||||
glm::quat Quat::lookAtSimple(const glm::vec3& eye, const glm::vec3& center) {
|
||||
|
|
Loading…
Reference in a new issue