|
@@ -142,7 +142,14 @@ 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_ = Clamp(pitch_, -90.0f, 90.0f);
|
|
pitch_ = Clamp(pitch_, -90.0f, 90.0f);
|
|
|
|
|
+ input->SetMouseMode(MM_RELATIVE);
|
|
|
}
|
|
}
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ if (input->GetMouseMode() != MM_ABSOLUTE)
|
|
|
|
|
+ input->SetMouseMode(MM_ABSOLUTE);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 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
|
|
|
cameraNode_->SetRotation(Quaternion(pitch_, yaw_, 0.0f));
|
|
cameraNode_->SetRotation(Quaternion(pitch_, yaw_, 0.0f));
|