Compare Between two Vector for Example How can i say
if(Camera.main.transform.Rotate < Vector3(0,10,0)){
//do something
}
Compare Between two Vector for Example How can i say
if(Camera.main.transform.Rotate < Vector3(0,10,0)){
//do something
}
I think he wants to know if the camera has rotated more than 10 degrees, in this case he would want to store the original rotation and compare it to the actual rotation and if the difference is more than 10 in the y-axis, perform something. But I am just assuming…
var originalRotation:float;
function Start(){
originalRotation = Camera.main.transform.rotation.y;
}
function Update(){
var compare:float=Mathf.Abs(originalRotation-Camera.main.transform.rotation.y);
if(compare>10)
// Do something
}