mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 13:18:26 +02:00
Fix crash: don't simulate until geometry exists
This commit is contained in:
parent
4a1687c023
commit
7a602aedd1
1 changed files with 4 additions and 5 deletions
|
@ -34,14 +34,13 @@ void FaceModel::simulate(float deltaTime) {
|
||||||
const float MODEL_SCALE = 0.0006f;
|
const float MODEL_SCALE = 0.0006f;
|
||||||
setScale(glm::vec3(1.0f, 1.0f, 1.0f) * _owningHead->getScale() * MODEL_SCALE);
|
setScale(glm::vec3(1.0f, 1.0f, 1.0f) * _owningHead->getScale() * MODEL_SCALE);
|
||||||
|
|
||||||
if (isActive()) {
|
|
||||||
setOffset(-_geometry->getFBXGeometry().neckPivot);
|
|
||||||
}
|
|
||||||
|
|
||||||
setPupilDilation(_owningHead->getPupilDilation());
|
setPupilDilation(_owningHead->getPupilDilation());
|
||||||
setBlendshapeCoefficients(_owningHead->getBlendshapeCoefficients());
|
setBlendshapeCoefficients(_owningHead->getBlendshapeCoefficients());
|
||||||
|
|
||||||
Model::simulateInternal(deltaTime);
|
if (isActive()) {
|
||||||
|
setOffset(-_geometry->getFBXGeometry().neckPivot);
|
||||||
|
Model::simulateInternal(deltaTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FaceModel::maybeUpdateNeckRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) {
|
void FaceModel::maybeUpdateNeckRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) {
|
||||||
|
|
Loading…
Reference in a new issue