mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 11:47:25 +02:00
offset is included in shape key for models
This commit is contained in:
parent
dcb720a832
commit
5c585acd9a
2 changed files with 4 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue