Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions sdkproject/Assets/MapboxAR/Scripts/Camera/ManualTouchCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,21 @@ public class ManualTouchCamera : MonoBehaviour
[SerializeField]
Transform _mapHolder;

float speed = 1f;

Vector2?[] _oldTouchPositions = { null, null };

Vector2 _oldTouchVector;
Vector3 _delta;
float _oldTouchDistance;
Vector3 _origin;

bool _wasTouching;

bool _shouldDrag;

void Update()
{

if (Input.touchCount == 0)
{
_oldTouchPositions[0] = null;
_oldTouchPositions[1] = null;
_shouldDrag = false;

}
else if (Input.touchCount == 1)
Expand All @@ -47,11 +41,6 @@ void Update()
_oldTouchPositions[1] = null;
}

if (Input.GetTouch(0).phase == TouchPhase.Began)
{
_origin = Input.GetTouch(0).position;
}

if (Input.GetTouch(0).phase == TouchPhase.Moved)
{
var touchDelta = Input.GetTouch(0).deltaPosition;
Expand Down