mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 07:39:44 +02:00
Fix for non-Faceshift eye and mouth movement.
This commit is contained in:
parent
dfa3ea78da
commit
083c5e34b2
1 changed files with 5 additions and 3 deletions
|
@ -142,8 +142,10 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
|
|
||||||
// Update audio trailing average for rendering facial animations
|
// Update audio trailing average for rendering facial animations
|
||||||
Faceshift* faceshift = Application::getInstance()->getFaceshift();
|
Faceshift* faceshift = Application::getInstance()->getFaceshift();
|
||||||
_isFaceshiftConnected = faceshift != NULL;
|
if (isMine) {
|
||||||
|
_isFaceshiftConnected = faceshift->isActive();
|
||||||
|
}
|
||||||
|
|
||||||
if (isMine && faceshift->isActive()) {
|
if (isMine && faceshift->isActive()) {
|
||||||
const float EYE_OPEN_SCALE = 0.5f;
|
const float EYE_OPEN_SCALE = 0.5f;
|
||||||
_leftEyeBlink = faceshift->getLeftBlink() - EYE_OPEN_SCALE * faceshift->getLeftEyeOpen();
|
_leftEyeBlink = faceshift->getLeftBlink() - EYE_OPEN_SCALE * faceshift->getLeftEyeOpen();
|
||||||
|
@ -157,7 +159,7 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
_browAudioLift = faceshift->getBrowUpCenter() * BROW_HEIGHT_SCALE;
|
_browAudioLift = faceshift->getBrowUpCenter() * BROW_HEIGHT_SCALE;
|
||||||
_blendshapeCoefficients = faceshift->getBlendshapeCoefficients();
|
_blendshapeCoefficients = faceshift->getBlendshapeCoefficients();
|
||||||
|
|
||||||
} else if (!_isFaceshiftConnected) {
|
} else if (!_isFaceshiftConnected) {
|
||||||
// Update eye saccades
|
// Update eye saccades
|
||||||
const float AVERAGE_MICROSACCADE_INTERVAL = 0.50f;
|
const float AVERAGE_MICROSACCADE_INTERVAL = 0.50f;
|
||||||
const float AVERAGE_SACCADE_INTERVAL = 4.0f;
|
const float AVERAGE_SACCADE_INTERVAL = 4.0f;
|
||||||
|
|
Loading…
Reference in a new issue