Skip to content

Commit

Permalink
Merge pull request #944 from HifiExperiments/physicsFix
Browse files Browse the repository at this point in the history
Possible fix for bad physics performance
  • Loading branch information
digisomni authored Dec 30, 2020
2 parents f894a0a + 0f9f95f commit 165537a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/entities-renderer/src/RenderableModelEntityItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 165537a

Please sign in to comment.