Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qgs3daxis: Fix camera conf by taking into account terrain offset
This was found by Stefanos Natsis.
  • Loading branch information
ptitjano authored and nyalldawson committed Apr 1, 2023
1 parent 27dbb7e commit ce508f6
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 ce508f6

Please sign in to comment.