Skip to content

Commit

Permalink
#5644: Fix non-uniform drag-resize operations sending the light's ori…
Browse files Browse the repository at this point in the history
…gin way off the view
  • Loading branch information
codereader committed Aug 5, 2021
1 parent 68ca786 commit 3718a2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions radiantcore/entity/light/LightNode.cpp
Expand Up @@ -557,11 +557,11 @@ void LightNode::evaluateTransform()
else
{
// Ordinary Drag manipulator
//_dragPlanes.m_bounds = _light.aabb();
// greebo: Be sure to use the actual lightAABB for evaluating the drag operation, NOT
// the aabb() or localABB() method, that returns the bounding box including the light center,
// which may be positioned way out of the volume
_dragPlanes.m_bounds = _light.lightAABB();
// greebo: To evaluate the drag operation use a fresh AABB as starting point.
// We don't use the aabb() or localABB() methods, those return the bounding box
// including the light center, which may be positioned way out of the volume
_dragPlanes.m_bounds = AABB(_light._originTransformed, _light.m_doom3Radius.m_radiusTransformed);

_light.setLightRadius(_dragPlanes.evaluateResize(getTranslation(), rotation()));
}
}
Expand Down

0 comments on commit 3718a2d

Please sign in to comment.