diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index 7cda62f74d..fb79b8d5b2 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -710,12 +710,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) { } glm::vec3 collisionModelDimensions = box.getDimensions(); - QString shapeKey = _compoundShapeURL + "," + - QString::number(_registrationPoint.x) + "," + - QString::number(_registrationPoint.y) + "," + - QString::number(_registrationPoint.z); - - info.setParams(type, collisionModelDimensions, shapeKey); + info.setParams(type, collisionModelDimensions, _compoundShapeURL); info.setConvexHulls(_points); info.setOffset(_model->getOffset()); } diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp index 147905b72a..5118664268 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp @@ -1231,6 +1231,8 @@ void RenderablePolyVoxEntityItem::computeShapeInfoWorkerAsync() { } glm::vec3 collisionModelDimensions = box.getDimensions(); + // include the registrationPoint in the shape key, because the offset is already + // included in the points and the shapeManager wont know that the shape has changed. QString shapeKey = QString(_voxelData.toBase64()) + "," + QString::number(_registrationPoint.x) + "," + QString::number(_registrationPoint.y) + "," + @@ -1238,6 +1240,7 @@ void RenderablePolyVoxEntityItem::computeShapeInfoWorkerAsync() { _shapeInfoLock.lockForWrite(); _shapeInfo.setParams(SHAPE_TYPE_COMPOUND, collisionModelDimensions, shapeKey); _shapeInfo.setConvexHulls(points); + // adjustShapeInfoByRegistration(_shapeInfo); _shapeInfoLock.unlock(); _meshLock.lockForWrite();