Faceshift rotates body, slow near others for easier positioning
Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -1752,6 +1752,11 @@ void Application::update(float deltaTime) { · 1751 unmodified lines | ||
| 1752 | 1752 | |
| 1753 | 1753 | // Update faceshift |
| 1754 | 1754 | _faceshift.update(); |
| 1755 | + | |
| 1756 | + // Copy angular velocity if measured by faceshift, to the head | |
| 1757 | + if (_faceshift.isActive()) { | |
| 1758 | + _myAvatar.getHead().setAngularVelocity(_faceshift.getHeadAngularVelocity()); | |
| 1759 | + } | |
| 1755 | 1760 | |
| 1756 | 1761 | // if we have faceshift, use that to compute the lookat direction |
| 1757 | 1762 | glm::vec3 lookAtRayOrigin = mouseRayOrigin, lookAtRayDirection = mouseRayDirection; |
| @@ -1934,7 +1939,7 @@ void Application::update(float deltaTime) { · 176 unmodified lines | ||
| 1934 | 1939 | if (!avatar->isInitialized()) { |
| 1935 | 1940 | avatar->init(); |
| 1936 | 1941 | } |
| 1937 | − avatar->simulate(deltaTime, NULL, 0.f); | |
| 1942 | + avatar->simulate(deltaTime, NULL); | |
| 1938 | 1943 | avatar->setMouseRay(mouseRayOrigin, mouseRayDirection); |
| 1939 | 1944 | } |
| 1940 | 1945 | node->unlock(); |
| @@ -1949,9 +1954,9 @@ void Application::update(float deltaTime) { · 8 unmodified lines | ||
| 1949 | 1954 | } |
| 1950 | 1955 | |
| 1951 | 1956 | if (Menu::getInstance()->isOptionChecked(MenuOption::TransmitterDrive) && _myTransmitter.isConnected()) { |
| 1952 | − _myAvatar.simulate(deltaTime, &_myTransmitter, Menu::getInstance()->getGyroCameraSensitivity()); | |
| 1957 | + _myAvatar.simulate(deltaTime, &_myTransmitter); | |
| 1953 | 1958 | } else { |
| 1954 | − _myAvatar.simulate(deltaTime, NULL, Menu::getInstance()->getGyroCameraSensitivity()); | |
| 1959 | + _myAvatar.simulate(deltaTime, NULL); | |
| 1955 | 1960 | } |
| 1956 | 1961 | |
| 1957 | 1962 | // no transmitter drive implies transmitter pick |