mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-29 05:17:58 +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;
|
constexpr auto copyMask = ~Mask_UpdateVisitor;
|
||||||
|
|
||||||
AnalyzeVisitor analyzeVisitor(copyMask);
|
AnalyzeVisitor analyzeVisitor(copyMask);
|
||||||
osg::Vec3f center3 = { center.x(), center.y(), 0.f };
|
analyzeVisitor.mCurrentDistance = (viewPoint - worldCenter).length2();
|
||||||
analyzeVisitor.mCurrentDistance = (viewPoint - center3).length2();
|
|
||||||
float minSize = mMinSize;
|
float minSize = mMinSize;
|
||||||
if (mMinSizeMergeFactor)
|
if (mMinSizeMergeFactor)
|
||||||
minSize *= mMinSizeMergeFactor;
|
minSize *= mMinSizeMergeFactor;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue