Merge pull request #1 from ctrlaltdavid/fix/collision-hull-update

Fix collision hull not necessarily being updated when model URL changed
This commit is contained in:
HifiExperiments 2020-11-24 15:20:57 -08:00 committed by GitHub
commit 78b81cdbb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);