Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbabdac

Browse files
ptitjanogithub-actions[bot]
authored andcommittedMar 20, 2023
qgs3daxis: Fix camera conf by taking into account terrain offset
This was found by Stefanos Natsis.
1 parent 4f41d10 commit cbabdac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/3d/qgs3daxis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ void Qgs3DAxis::onCameraViewChange( float pitch, float yaw )
745745
QgsDebugMsgLevel( "Unable to obtain elevation from terrain", 2 );
746746

747747
}
748-
pos.set( pos.x(), elevation, pos.z() );
748+
pos.set( pos.x(), elevation + mMapSettings->terrainElevationOffset(), pos.z() );
749749

750750
mCameraController->setLookingAtPoint( pos, ( mCameraController->camera()->position() - pos.toVector3D() ).length(),
751751
pitch, yaw );

0 commit comments

Comments
 (0)
Please sign in to comment.