mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 11:42:51 +02:00
fixed LOD issue in client
This commit is contained in:
parent
0f71627923
commit
6a7ebb3a55
2 changed files with 2 additions and 1 deletions
|
@ -234,6 +234,7 @@ bool VoxelNode::isInView(const ViewFrustum& viewFrustum) const {
|
|||
float VoxelNode::distanceToCamera(const ViewFrustum& viewFrustum) const {
|
||||
AABox box;
|
||||
getAABox(box);
|
||||
box.scale(TREE_SCALE);
|
||||
float distanceToVoxelCenter = sqrtf(powf(viewFrustum.getPosition().x - (box.getCorner().x + box.getSize().x), 2) +
|
||||
powf(viewFrustum.getPosition().y - (box.getCorner().y + box.getSize().y), 2) +
|
||||
powf(viewFrustum.getPosition().z - (box.getCorner().z + box.getSize().z), 2));
|
||||
|
|
Loading…
Reference in a new issue