mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 12:24:01 +02:00
Blendshapes for OtherAvatars should update even if no joints have changes.
This commit is contained in:
parent
03f88f696d
commit
61b9f08fec
2 changed files with 6 additions and 2 deletions
|
@ -267,6 +267,7 @@ void OtherAvatar::simulate(float deltaTime, bool inView) {
|
|||
_skeletonModel->getRig().computeExternalPoses(rootTransform);
|
||||
_jointDataSimulationRate.increment();
|
||||
|
||||
head->simulate(deltaTime);
|
||||
_skeletonModel->simulate(deltaTime, true);
|
||||
|
||||
locationChanged(); // joints changed, so if there are any children, update them.
|
||||
|
@ -277,9 +278,11 @@ void OtherAvatar::simulate(float deltaTime, bool inView) {
|
|||
headPosition = getWorldPosition();
|
||||
}
|
||||
head->setPosition(headPosition);
|
||||
} else {
|
||||
head->simulate(deltaTime);
|
||||
_skeletonModel->simulate(deltaTime, false);
|
||||
}
|
||||
head->setScale(getModelScale());
|
||||
head->simulate(deltaTime);
|
||||
relayJointDataToChildren();
|
||||
} else {
|
||||
// a non-full update is still required so that the position, rotation, scale and bounds of the skeletonModel are updated.
|
||||
|
|
|
@ -165,8 +165,9 @@ void SkeletonModel::updateAttitude(const glm::quat& orientation) {
|
|||
// but just before head has been simulated.
|
||||
void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
|
||||
updateAttitude(_owningAvatar->getWorldOrientation());
|
||||
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
|
||||
|
||||
if (fullUpdate) {
|
||||
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
|
||||
|
||||
Parent::simulate(deltaTime, fullUpdate);
|
||||
|
||||
|
|
Loading…
Reference in a new issue