mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Fix for eye pitch, track blinking locally.
This commit is contained in:
parent
2c2f2fad5a
commit
f84d6f4f37
2 changed files with 36 additions and 29 deletions
|
@ -192,6 +192,12 @@ void Head::simulate(float deltaTime, bool isMine, float gyroCameraSensitivity) {
|
|||
_browAudioLift *= 0.7f;
|
||||
|
||||
// update eyelid blinking
|
||||
Faceshift* faceshift = Application::getInstance()->getFaceshift();
|
||||
if (isMine && faceshift->isActive()) {
|
||||
_leftEyeBlink = faceshift->getLeftBlink();
|
||||
_rightEyeBlink = faceshift->getRightBlink();
|
||||
|
||||
} else {
|
||||
const float BLINK_SPEED = 10.0f;
|
||||
const float FULLY_OPEN = 0.0f;
|
||||
const float FULLY_CLOSED = 1.0f;
|
||||
|
@ -221,6 +227,7 @@ void Head::simulate(float deltaTime, bool isMine, float gyroCameraSensitivity) {
|
|||
_rightEyeBlinkVelocity = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// based on the nature of the lookat position, determine if the eyes can look / are looking at it.
|
||||
if (USING_PHYSICAL_MOHAWK) {
|
||||
|
|
|
@ -71,9 +71,9 @@ void Faceshift::readFromSocket() {
|
|||
const float TRANSLATION_SCALE = 0.02f;
|
||||
_headTranslation = glm::vec3(data.m_headTranslation.x, data.m_headTranslation.y,
|
||||
-data.m_headTranslation.z) * TRANSLATION_SCALE;
|
||||
_eyeGazeLeftPitch = data.m_eyeGazeLeftPitch;
|
||||
_eyeGazeLeftPitch = -data.m_eyeGazeLeftPitch;
|
||||
_eyeGazeLeftYaw = data.m_eyeGazeLeftYaw;
|
||||
_eyeGazeRightPitch = data.m_eyeGazeRightPitch;
|
||||
_eyeGazeRightPitch = -data.m_eyeGazeRightPitch;
|
||||
_eyeGazeRightYaw = data.m_eyeGazeRightYaw;
|
||||
|
||||
if (_leftBlinkIndex != -1) {
|
||||
|
|
Loading…
Reference in a new issue