mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Merge pull request #7096 from howard-stearns/fix-lookAt
Fix Quat.lookAt
This commit is contained in:
commit
7d400623be
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