خرید بک لینک

Vote count: 0

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.

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 22 خرداد 1395 ساعت: 19:06

صفحه بندی