Fix avatar eyelids and blinking in recording playback

Reinstates conditions to not calculate eye movements if face / eye
trackers are connected; they're considered connected for recording
playback.
This commit is contained in:
David Rowe 2017-05-18 13:30:29 +12:00
parent 223b1a858b
commit f00232ab6d

View file

@ -65,6 +65,8 @@ void Head::computeAudioLoudness(float deltaTime) {
}
void Head::computeEyeMovement(float deltaTime) {
if (!_isFaceTrackerConnected) {
if (!_isEyeTrackerConnected) {
// Update eye saccades
const float AVERAGE_MICROSACCADE_INTERVAL = 1.0f;
const float AVERAGE_SACCADE_INTERVAL = 6.0f;
@ -78,6 +80,9 @@ void Head::computeEyeMovement(float deltaTime) {
_saccadeTarget = SACCADE_MAGNITUDE * randVector();
}
_saccade += (_saccadeTarget - _saccade) * pow(0.5f, NOMINAL_FRAME_RATE * deltaTime);
} else {
_saccade = glm::vec3();
}
// Detect transition from talking to not; force blink after that and a delay
bool forceBlink = false;
@ -128,6 +133,9 @@ void Head::computeEyeMovement(float deltaTime) {
}
applyEyelidOffset(getOrientation());
} else {
_saccade = glm::vec3();
}
}
void Head::computeFaceMovement(float deltaTime) {