Skip to content

Commit

Permalink
Fix inverted tiling
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 26, 2020
1 parent 77de8a3 commit 0ad1738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/3d/chunks/qgschunkloader_p.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 0ad1738

Please sign in to comment.