Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Update()
- {
- if (isExamining && Input.touchCount > 0)
- {
- // Get first touch
- Touch touch = Input.GetTouch(0);
- if (touch.phase == TouchPhase.Moved) {
- Vector3 rotation = new Vector3(touch.deltaPosition.x, touch.deltaPosition.y, 0) * _rotSpeed * Time.deltaTime;
- _examinedObject.transform.Rotate(rotation);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement