From 38118fdab039591c7905afaa3acb3c4963c0b5fe Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 10 Jan 2014 14:42:05 -0800 Subject: [PATCH] When we start setting the fake coefficients after we set the real ones, make sure all of the other coefficients are zero. --- interface/src/devices/Faceshift.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/src/devices/Faceshift.cpp b/interface/src/devices/Faceshift.cpp index f8600b6e50..347bb82bc4 100644 --- a/interface/src/devices/Faceshift.cpp +++ b/interface/src/devices/Faceshift.cpp @@ -95,6 +95,7 @@ void Faceshift::reset() { void Faceshift::updateFakeCoefficients(float leftBlink, float rightBlink, float browUp, float jawOpen, std::vector& coefficients) const { coefficients.resize(max((int)coefficients.size(), _jawOpenIndex + 1)); + qFill(coefficients.begin(), coefficients.end(), 0.0f); coefficients[_leftBlinkIndex] = leftBlink; coefficients[_rightBlinkIndex] = rightBlink; coefficients[_browUpCenterIndex] = browUp;