mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Use same world coordinates to compute distances
This commit is contained in:
parent
83af0402b8
commit
269cd31059
1 changed files with 1 additions and 2 deletions
|
@ -485,8 +485,7 @@ namespace MWRender
|
|||
constexpr auto copyMask = ~Mask_UpdateVisitor;
|
||||
|
||||
AnalyzeVisitor analyzeVisitor(copyMask);
|
||||
osg::Vec3f center3 = { center.x(), center.y(), 0.f };
|
||||
analyzeVisitor.mCurrentDistance = (viewPoint - center3).length2();
|
||||
analyzeVisitor.mCurrentDistance = (viewPoint - worldCenter).length2();
|
||||
float minSize = mMinSize;
|
||||
if (mMinSizeMergeFactor)
|
||||
minSize *= mMinSizeMergeFactor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue