diff --git a/Assets/Scripts/BaseCameraController.cs b/Assets/Scripts/BaseCameraController.cs index 195f4bdc2edc7be5b84336682747a671b19c6b84..bc1a1efeb30ae1e7cd19a47bf2a4330d03594a00 100644 --- a/Assets/Scripts/BaseCameraController.cs +++ b/Assets/Scripts/BaseCameraController.cs @@ -1,3 +1,5 @@ +#undef DEBUG_DRAW + using System; using UnityEngine; @@ -100,7 +102,9 @@ public class BaseCameraController : MonoBehaviour // Mouse input var mouseViewportPos = camera.ScreenToViewportPoint(Input.mousePosition); var mouseInputVector = mouseMovementEdges.GetOutOfBoundsDirection(mouseViewportPos); +#if DEBUG_DRAW mouseMovementEdges.DrawDebug(waitForMouseOutsideEdges ? Color.red : Color.green); +#endif if (waitForMouseOutsideEdges && mouseInputVector.magnitude == 0) { // If mouse input was disabled and mouse left edge zone, re-enable mouse input @@ -120,10 +124,12 @@ public class BaseCameraController : MonoBehaviour zoomInterpolator.targetValue += inputZoomDelta; } } +#if DEBUG_DRAW else { mouseMovementEdges.DrawDebug(Color.yellow); } +#endif // Always interpolate zoom as that might be animted without user input enabled if (zoomInterpolator.running)