mirror of
https://github.com/lubosz/overte.git
synced 2025-04-11 06:32:09 +02:00
Merge pull request #8231 from AlexanderOtavka/fix-orientation
Fix orientation being reset to 0,0,0,1
This commit is contained in:
commit
0d58274028
1 changed files with 4 additions and 4 deletions
|
@ -564,10 +564,10 @@ bool AddressManager::handleViewpoint(const QString& viewpointString, bool should
|
|||
if (viewpointString[positionRegex.matchedLength() - 1] == QChar('/')
|
||||
&& orientationRegex.indexIn(viewpointString, positionRegex.matchedLength() - 1) != -1) {
|
||||
|
||||
glm::quat newOrientation = glm::normalize(glm::quat(orientationRegex.cap(4).toFloat(),
|
||||
orientationRegex.cap(1).toFloat(),
|
||||
orientationRegex.cap(2).toFloat(),
|
||||
orientationRegex.cap(3).toFloat()));
|
||||
newOrientation = glm::normalize(glm::quat(orientationRegex.cap(4).toFloat(),
|
||||
orientationRegex.cap(1).toFloat(),
|
||||
orientationRegex.cap(2).toFloat(),
|
||||
orientationRegex.cap(3).toFloat()));
|
||||
|
||||
if (!isNaN(newOrientation.x) && !isNaN(newOrientation.y) && !isNaN(newOrientation.z)
|
||||
&& !isNaN(newOrientation.w)) {
|
||||
|
|
Loading…
Reference in a new issue