mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 00:14:05 +02:00
using glm::degrees() instead of DEGREES_PER_RADIAN
This commit is contained in:
parent
c3e8d51694
commit
e68241d2a9
2 changed files with 3 additions and 3 deletions
|
@ -334,12 +334,12 @@ void MyAvatar::updateFromGyros(float deltaTime) {
|
||||||
bool trackerActive = false;
|
bool trackerActive = false;
|
||||||
if (faceshift->isActive()) {
|
if (faceshift->isActive()) {
|
||||||
estimatedPosition = faceshift->getHeadTranslation();
|
estimatedPosition = faceshift->getHeadTranslation();
|
||||||
estimatedRotation = DEGREES_PER_RADIAN * safeEulerAngles(faceshift->getHeadRotation());
|
estimatedRotation = glm::degrees(safeEulerAngles(faceshift->getHeadRotation()));
|
||||||
trackerActive = true;
|
trackerActive = true;
|
||||||
|
|
||||||
} else if (visage->isActive()) {
|
} else if (visage->isActive()) {
|
||||||
estimatedPosition = visage->getHeadTranslation();
|
estimatedPosition = visage->getHeadTranslation();
|
||||||
estimatedRotation = DEGREES_PER_RADIAN * safeEulerAngles(visage->getHeadRotation());
|
estimatedRotation = glm::degrees(safeEulerAngles(visage->getHeadRotation()));
|
||||||
trackerActive = true;
|
trackerActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ void HeadData::setOrientation(const glm::quat& orientation) {
|
||||||
_owningAvatar->setOrientation(bodyOrientation);
|
_owningAvatar->setOrientation(bodyOrientation);
|
||||||
|
|
||||||
// the rest goes to the head
|
// the rest goes to the head
|
||||||
glm::vec3 eulers = DEGREES_PER_RADIAN * safeEulerAngles(glm::inverse(bodyOrientation) * orientation);
|
glm::vec3 eulers = glm::degrees(safeEulerAngles(glm::inverse(bodyOrientation) * orientation));
|
||||||
_pitch = eulers.x;
|
_pitch = eulers.x;
|
||||||
_yaw = eulers.y;
|
_yaw = eulers.y;
|
||||||
_roll = eulers.z;
|
_roll = eulers.z;
|
||||||
|
|
Loading…
Reference in a new issue