fix: update zoom camera.

This commit is contained in:
Tungdv
2026-04-08 10:40:07 +07:00
parent 1463f70cad
commit f4c5393c37
@@ -26,6 +26,7 @@ namespace BrewMonster
private float _lastPinchDistance;
private bool _pinchZoomActive;
private int _touchCount = 0;
public CinemachineOrbitalFollow Orbital { get => orbital;}
@@ -63,11 +64,19 @@ namespace BrewMonster
public void OnPointerDown(PointerEventData eventData)
{
fingerDown = true;
if(_touchCount < 2)
{
_touchCount++;
}
}
public void OnPointerUp(PointerEventData eventData)
{
fingerDown = false;
if(_touchCount > 0)
{
_touchCount--;
}
}
private void OnValidate()
@@ -133,7 +142,7 @@ namespace BrewMonster
return;
}
if (Input.touchCount == 2)
if (_touchCount == 2)
{
Touch t0 = Input.GetTouch(0);
Touch t1 = Input.GetTouch(1);