diff --git a/.gitignore b/.gitignore index c296a918af..8d537b993f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,9 @@ interface/resources/visage/* interface/external/faceplus/* !interface/external/faceplus/readme.txt +# Ignore PrioVR +interface/external/priovr/* +!interface/external/priovr/readme.txt + # Ignore interfaceCache for Linux users interface/interfaceCache/ diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 014d53520e..1eac264ae4 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -239,7 +239,9 @@ void MyAvatar::updateFromTrackers(float deltaTime) { if (Application::getInstance()->getPrioVR()->isActive()) { estimatedRotation = glm::degrees(safeEulerAngles(Application::getInstance()->getPrioVR()->getHeadRotation())); - + estimatedRotation.x *= -1.0f; + estimatedRotation.z *= -1.0f; + } else { FaceTracker* tracker = Application::getInstance()->getActiveFaceTracker(); if (tracker) { diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index 5c017cd094..e48ebfa63c 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -200,7 +200,7 @@ void SkeletonModel::updateJointState(int index) { } void SkeletonModel::maybeUpdateLeanRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) { - if (!_owningAvatar->isMyAvatar()) { + if (!_owningAvatar->isMyAvatar() || Application::getInstance()->getPrioVR()->isActive()) { return; } // get the rotation axes in joint space and use them to adjust the rotation diff --git a/interface/src/devices/PrioVR.cpp b/interface/src/devices/PrioVR.cpp index adda3b5cb2..064e2be4b5 100644 --- a/interface/src/devices/PrioVR.cpp +++ b/interface/src/devices/PrioVR.cpp @@ -22,8 +22,8 @@ const unsigned int SERIAL_LIST[] = { 0x00000001, 0x00000000, 0x00000008, 0x00000 const unsigned char AXIS_LIST[] = { 9, 43, 37, 37, 37, 13, 13, 13, 52, 52, 28, 28 }; const int LIST_LENGTH = sizeof(SERIAL_LIST) / sizeof(SERIAL_LIST[0]); -const char* JOINT_NAMES[] = { "Head", "Spine", "LeftArm", "LeftForeArm", "LeftHand", "RightArm", - "RightForeArm", "RightHand", "LeftUpLeg", "LeftLeg", "RightUpLeft", "RightLeg" }; +const char* JOINT_NAMES[] = { "Neck", "Spine", "LeftArm", "LeftForeArm", "LeftHand", "RightArm", + "RightForeArm", "RightHand", "LeftUpLeg", "LeftLeg", "RightUpLeg", "RightLeg" }; #ifdef HAVE_PRIOVR static int indexOfHumanIKJoint(const char* jointName) { @@ -80,6 +80,12 @@ void PrioVR::update() { unsigned int timestamp; yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(), _jointRotations.size() * sizeof(glm::quat), ×tamp); + + // convert to our expected coordinate system + for (int i = 0; i < _jointRotations.size(); i++) { + _jointRotations[i].y *= -1.0f; + _jointRotations[i].z *= -1.0f; + } #endif } diff --git a/interface/src/devices/Visage.cpp b/interface/src/devices/Visage.cpp index 8173519478..119d89654a 100644 --- a/interface/src/devices/Visage.cpp +++ b/interface/src/devices/Visage.cpp @@ -55,7 +55,8 @@ Visage::Visage() : Visage::~Visage() { #ifdef HAVE_VISAGE _tracker->stop(); - delete _tracker; + // deleting the tracker crashes windows; disable for now + //delete _tracker; delete _data; #endif }