Hi …
I have a function that rotates an object and want to do something that restores the original values of rotation, but not work for me …
the script is part of the component object,
var Speed : float = 150;
var ok : boolean = false;
function Update () {
if(ok==true){
transform.Rotate (0.0, 45.0,Speed * Time.deltaTime);
}
}
function ResRotation(){
ok = false;
transform.Rotate(5.0,0.0,0.0);
}
Thank for your help!!
Pb