Skip to content

Commit

Permalink
qgs3daxis: Fix camera conf by taking into account terrain offset
Browse files Browse the repository at this point in the history
This was found by Stefanos Natsis.
  • Loading branch information
ptitjano authored and nyalldawson committed Mar 20, 2023
1 parent b11e2eb commit 61087b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/3d/qgs3daxis.cpp
Expand Up @@ -745,7 +745,7 @@ void Qgs3DAxis::onCameraViewChange( float pitch, float yaw )
QgsDebugMsgLevel( "Unable to obtain elevation from terrain", 2 );

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

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

0 comments on commit 61087b9

Please sign in to comment.