mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 13:50:35 +02:00
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:
parent
223b1a858b
commit
f00232ab6d
1 changed files with 64 additions and 56 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue