Hi Everyone,
I’m trying to rotate camera(X and Y only), but Z value is also being effected.
Here’s the script that I’m using.
if(Input.touchCount > 0){
my_Touch = Input.GetTouch(0);
if(Input.GetTouch(0).phase == TouchPhase.Moved){
Camera.main.transform.Rotate(my_Touch.deltaPosition.y * rotationSpeed, my_Touch.deltaPosition.x * rotationSpeed,0);
}
}
I also tried this but didn’t work : Problem with Z rotation when rotating X and Y and the same time. - Unity Answers