Skip to content
Permalink
Browse files

Fix inverted tiling

  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 26, 2020
1 parent 77de8a3 commit 0ad1738b6851728030f6e6c71699871ebe995864
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/3d/chunks/qgschunkloader_p.cpp
@@ -50,7 +50,7 @@ QVector<QgsChunkNode *> QgsQuadtreeChunkLoaderFactory::createChildren( QgsChunkN
for ( int i = 0; i < 4; ++i )
{
int dx = i & 1, dy = !!( i & 2 );
QgsChunkNodeId childId( nodeId.d + 1, nodeId.x * 2 + dx, nodeId.y * 2 + dy );
QgsChunkNodeId childId( nodeId.d + 1, nodeId.x * 2 + dx, nodeId.y * 2 + ( dy ? 0 : 1 ) ); // TODO: inverse dy?
// the Y and Z coordinates below are intentionally flipped, because
// in chunk node IDs the X,Y axes define horizontal plane,
// while in our 3D scene the X,Z axes define the horizontal plane

0 comments on commit 0ad1738

Please sign in to comment.
You can’t perform that action at this time.