Browse Source

Refine the orthographic zoom settings

weinand 9 years ago
parent
commit
6aa3855c10
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

+ 5 - 5
Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

@@ -197,6 +197,9 @@ void SceneView3D::MoveCamera(float timeStep)
     const float CAMERA_MOVE_TEMPO = 5.0f;
     // Tempo used when zooming in and out
     const float ZOOM_TEMPO = 0.6f;
+    // Orthographic zoom settings
+    const float ZOOM_INCREMENT = 0.1f;
+    const float DEFAULT_ZOOM = 1.0f;
 
     if (!enabled_ && !GetFocus())
         return;
@@ -216,11 +219,6 @@ void SceneView3D::MoveCamera(float timeStep)
     // Mouse sensitivity as degrees per pixel
     const float MOUSE_SENSITIVITY = 0.2f;
 
-    // Orthographic zoom settings
-    float currCameraZoom = camera_->GetZoom();
-    const float ZOOM_INCREMENT = 0.1f;
-    const float DEFAULT_ZOOM = 1.0f;
-
     if (shiftDown)
         MOVE_SPEED *= 3.0f;
 
@@ -337,6 +335,8 @@ void SceneView3D::MoveCamera(float timeStep)
 
     }
 
+    float currCameraZoom = camera_->GetZoom();
+
     if (camera_->IsOrthographic() && mouseInView && !orbitting)
     {
         if (input->GetMouseMoveWheel() > 0)