From 2222f8f4f66b8a7d4a138591e6ee9e8c6509e2e7 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 25 Nov 2020 11:54:19 +1300 Subject: [PATCH] Fix collision hull not necessarily being updated when model URL changed --- libraries/physics/src/PhysicalEntitySimulation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/physics/src/PhysicalEntitySimulation.cpp b/libraries/physics/src/PhysicalEntitySimulation.cpp index 4a2ee9184f..d0d900e14d 100644 --- a/libraries/physics/src/PhysicalEntitySimulation.cpp +++ b/libraries/physics/src/PhysicalEntitySimulation.cpp @@ -425,12 +425,12 @@ void PhysicalEntitySimulation::buildPhysicsTransaction(PhysicsEngine::Transactio continue; } - bool needsNewShape = object->needsNewShape(); + bool needsNewShape = object->needsNewShape() && object->_entity->isReadyToComputeShape(); if (needsNewShape) { ShapeType shapeType = object->getShapeType(); if (shapeType == SHAPE_TYPE_STATIC_MESH) { ShapeRequest shapeRequest(object->_entity); - ShapeRequests::iterator requestItr = _shapeRequests.find(shapeRequest); + ShapeRequests::iterator requestItr = _shapeRequests.find(shapeRequest); if (requestItr == _shapeRequests.end()) { ShapeInfo shapeInfo; object->_entity->computeShapeInfo(shapeInfo);