code review

This commit is contained in:
Seth Alves 2019-09-17 10:52:55 -07:00
parent 58cf51058b
commit 3ece763a8e

View file

@ -69,13 +69,13 @@ void MyHead::simulate(float deltaTime) {
float leftEyeBlink = userInputMapper->getActionState(controller::Action::LEFT_EYE_BLINK);
float rightEyeBlink = userInputMapper->getActionState(controller::Action::RIGHT_EYE_BLINK);
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
_blendshapeCoefficients[EYE_BLINK_L_INDEX] = leftEyeBlink;
_blendshapeCoefficients[EYE_BLINK_R_INDEX] = rightEyeBlink;
_blendshapeCoefficients[EYE_BLINK_INDICES[0]] = leftEyeBlink;
_blendshapeCoefficients[EYE_BLINK_INDICES[1]] = rightEyeBlink;
} else {
const float FULLY_OPEN = 0.0f;
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
_blendshapeCoefficients[EYE_BLINK_L_INDEX] = FULLY_OPEN;
_blendshapeCoefficients[EYE_BLINK_R_INDEX] = FULLY_OPEN;
_blendshapeCoefficients[EYE_BLINK_INDICES[0]] = FULLY_OPEN;
_blendshapeCoefficients[EYE_BLINK_INDICES[1]] = FULLY_OPEN;
}
}
Parent::simulate(deltaTime);