Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix 3d camera yaw and pitch sensitivity
- Loading branch information
Showing
with
3 additions
and
3 deletions.
-
+3
−3
src/3d/qgscameracontroller.cpp
|
@@ -305,8 +305,8 @@ void QgsCameraController::onPositionChanged( Qt3DInput::QMouseEvent *mouse ) |
|
|
// rotate/tilt using mouse (camera moves as it rotates around its view center) |
|
|
float pitch = mCameraPose.pitchAngle(); |
|
|
float yaw = mCameraPose.headingAngle(); |
|
|
pitch += dy; |
|
|
yaw -= dx / 2; |
|
|
pitch += 0.2f * dy; |
|
|
yaw -= 0.2f * dx; |
|
|
mCameraPose.setPitchAngle( pitch ); |
|
|
mCameraPose.setHeadingAngle( yaw ); |
|
|
updateCameraFromPose(); |
|
@@ -315,7 +315,7 @@ void QgsCameraController::onPositionChanged( Qt3DInput::QMouseEvent *mouse ) |
|
|
{ |
|
|
// rotate/tilt using mouse (camera stays at one position as it rotates) |
|
|
float diffPitch = 0.2f * dy; |
|
|
float diffYaw = 0.2f * -dx / 2; |
|
|
float diffYaw = - 0.2f * dx; |
|
|
rotateCamera( diffPitch, diffYaw ); |
|
|
updateCameraFromPose( true ); |
|
|
} |
|
|