mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
move offset handling for models back to how it was before this PR
This commit is contained in:
parent
c95d1f68f6
commit
8b8604f9b0
1 changed files with 2 additions and 1 deletions
|
@ -699,6 +699,8 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
|||
AABox box;
|
||||
for (int i = 0; i < _points.size(); i++) {
|
||||
for (int j = 0; j < _points[i].size(); j++) {
|
||||
// compensate for registration
|
||||
_points[i][j] += _model->getOffset();
|
||||
// scale so the collision points match the model points
|
||||
_points[i][j] *= scale;
|
||||
box += _points[i][j];
|
||||
|
@ -708,7 +710,6 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
|||
glm::vec3 collisionModelDimensions = box.getDimensions();
|
||||
info.setParams(type, collisionModelDimensions, _compoundShapeURL);
|
||||
info.setConvexHulls(_points);
|
||||
info.setOffset(_model->getOffset());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue