mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 18:44:00 +02:00
Fix face-tracked head rotation for Faceshift, also
This commit is contained in:
parent
5050171d30
commit
7319c7b767
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ void Faceshift::receive(const QByteArray& buffer) {
|
|||
glm::quat newRotation = glm::quat(data.m_headRotation.w, -data.m_headRotation.x,
|
||||
data.m_headRotation.y, -data.m_headRotation.z);
|
||||
// Compute angular velocity of the head
|
||||
glm::quat r = newRotation * glm::inverse(_headRotation);
|
||||
glm::quat r = glm::normalize(newRotation * glm::inverse(_headRotation));
|
||||
float theta = 2 * acos(r.w);
|
||||
if (theta > EPSILON) {
|
||||
float rMag = glm::length(glm::vec3(r.x, r.y, r.z));
|
||||
|
|
Loading…
Reference in a new issue