Skip to content

Commit

Permalink
GRAPHICS: Fix bounding box calculation for attached models
Browse files Browse the repository at this point in the history
  • Loading branch information
mirv-sillyfish authored and DrMcCoy committed Nov 17, 2018
1 parent cf79afa commit 0d1b943
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/graphics/aurora/modelnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,20 @@ void ModelNode::createAbsoluteBound(Common::BoundingBox parentPosition) {
_attachedModel->_scale[1],
_attachedModel->_scale[2]));


/**
* @todo So this is a great big dirty hack to keep relative positioning
* in place for rendering purposes, while still allowing bounding volumes
* to be properly created.
* This should be replaced by a _globalTransform / _localTransform system
* one day.
*/
glm::mat4 apos = _attachedModel->_absolutePosition; // Hack part A.
_attachedModel->_absolutePosition = modelPosition;
_attachedModel->createBound();

_absoluteBoundBox.add(_attachedModel->_absoluteBoundBox);
_attachedModel->_absolutePosition = apos; // Hack part B.
}
}

Expand Down

0 comments on commit 0d1b943

Please sign in to comment.