Merge pull request #944 from HifiExperiments/physicsFix

Possible fix for bad physics performance
This commit is contained in:
Kalila 2020-12-30 03:04:17 -05:00 committed by GitHub
commit 165537a4eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,9 +189,6 @@ void RenderableModelEntityItem::updateModelBounds() {
glm::vec3 scale = model->getScale();
model->setUseDualQuaternionSkinning(!isNonUniformScale(scale));
model->updateRenderItems();
markDirtyFlags(Simulation::DIRTY_SHAPE | Simulation::DIRTY_MASS);
locationChanged();
}
}
@ -1267,6 +1264,9 @@ void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint
entity->_originalTexturesRead = false;
entity->_needsJointSimulation = true;
entity->_needsToRescaleModel = true;
entity->markDirtyFlags(Simulation::DIRTY_SHAPE | Simulation::DIRTY_MASS);
entity->locationChanged();
emit requestRenderUpdate();
});
scene->enqueueTransaction(transaction);