mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Fix orientation being reset to 0,0,0,1
This commit is contained in:
parent
bcee128de0
commit
87ba1ffeca
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('/')
|
if (viewpointString[positionRegex.matchedLength() - 1] == QChar('/')
|
||||||
&& orientationRegex.indexIn(viewpointString, positionRegex.matchedLength() - 1) != -1) {
|
&& orientationRegex.indexIn(viewpointString, positionRegex.matchedLength() - 1) != -1) {
|
||||||
|
|
||||||
glm::quat newOrientation = glm::normalize(glm::quat(orientationRegex.cap(4).toFloat(),
|
newOrientation = glm::normalize(glm::quat(orientationRegex.cap(4).toFloat(),
|
||||||
orientationRegex.cap(1).toFloat(),
|
orientationRegex.cap(1).toFloat(),
|
||||||
orientationRegex.cap(2).toFloat(),
|
orientationRegex.cap(2).toFloat(),
|
||||||
orientationRegex.cap(3).toFloat()));
|
orientationRegex.cap(3).toFloat()));
|
||||||
|
|
||||||
if (!isNaN(newOrientation.x) && !isNaN(newOrientation.y) && !isNaN(newOrientation.z)
|
if (!isNaN(newOrientation.x) && !isNaN(newOrientation.y) && !isNaN(newOrientation.z)
|
||||||
&& !isNaN(newOrientation.w)) {
|
&& !isNaN(newOrientation.w)) {
|
||||||
|
|
Loading…
Reference in a new issue