I try to a camera paed by touch on the Android devices. It works but the camera moves differently. On one touch movement it follows too quickly, on another touch movement - too slowly.
Where I took a bug. How to fix it?
It's my code for sensor screen:
private void updatePDA()
{
if(Input.touchCount > 0)
{
Touch t = Input.GetTouch(0);
if (t.phase == TouchPhase.Moved)
{
_speed = Camera.main.orthographicSize / _cameraSize;
transform.Translate(Vector3.left * t.deltaPosition.x * _speed * Time.smoothDeltaTime * 2f);
}
}
}
The camera in the orghographic mode.
