Browse Source

Allow the camera to rotate in the scene view infinitely. Right click on viewport will hide the cursor and allow the camera to continue to rotate. Fix issue #480

benwolf 9 years ago
parent
commit
8873e5112e
2 changed files with 7 additions and 0 deletions
  1. 2 0
      AUTHORS.md
  2. 5 0
      Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

+ 2 - 0
AUTHORS.md

@@ -37,6 +37,8 @@
 
 
 - Kobus vd Walt (https://github.com/Kobusvdwalt)
 - Kobus vd Walt (https://github.com/Kobusvdwalt)
 
 
+- Benjamin Wolf (https://github.com/Benwolf)
+
 ### Contribution Copyright and Licensing
 ### Contribution Copyright and Licensing
 
 
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.

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

@@ -229,6 +229,11 @@ void SceneView3D::MoveCamera(float timeStep)
         yaw_ += MOUSE_SENSITIVITY * mouseMove.x_;
         yaw_ += MOUSE_SENSITIVITY * mouseMove.x_;
         pitch_ += MOUSE_SENSITIVITY * mouseMove.y_;
         pitch_ += MOUSE_SENSITIVITY * mouseMove.y_;
         pitch_ = Atomic::Clamp(pitch_, -90.0f, 90.0f);
         pitch_ = Atomic::Clamp(pitch_, -90.0f, 90.0f);
+        input->SetMouseVisible(false);
+    }
+    else
+    {
+        input->SetMouseVisible(true);
     }
     }
 
 
     // Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero
     // Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero