Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Rendering/Camera/ThirdPersonCamera.cpp

Diff revisions: vs.
  @@ -24,7 +24,7 @@
24 24
25 25 Application::getInstance().snapCursorToCenter();
26 26
27 - if (IS_ZERO(mousePos.x) && IS_ZERO(mousePos.y)){
27 + if (IS_ZERO(mousePos.x) && IS_ZERO(mousePos.y)) {
28 28 return OrbitCamera::mouseMoved(arg);
29 29 }
30 30
  @@ -32,21 +32,23 @@
32 32
33 33 if (!IS_ZERO(mousePos.y)) {
34 34 F32 targetRoll = _cameraRotation.roll - mousePos.y;
35 - if(targetRoll > -rotationLimitRollLower && targetRoll < rotationLimitRollUpper){
35 + if (targetRoll > -rotationLimitRollLower && targetRoll < rotationLimitRollUpper) {
36 36 _cameraRotation.roll -= mousePos.y; //why roll? beats me.
37 37 _rotationDirty = true;
38 38 }
39 39 }
40 +
40 41 if (!IS_ZERO(mousePos.x)) {
41 42 F32 targetYaw = _cameraRotation.yaw - mousePos.x;
42 - if(targetYaw > -rotationLimitYaw && targetYaw < rotationLimitYaw){
43 + if (targetYaw > -rotationLimitYaw && targetYaw < rotationLimitYaw) {
43 44 _cameraRotation.yaw -= mousePos.x;
44 45 _rotationDirty = true;
45 46 }
46 47 }
47 48
48 - if(_rotationDirty)
49 + if (_rotationDirty) {
49 50 Util::normalize(_cameraRotation, false,true, false, true);
51 + }
50 52
51 53 return OrbitCamera::mouseMoved(arg);
52 54 }