Tom_O
1
var Destination : Transform;
var rotate : int;
function OnMouseDown () { // if i use update it just doesn't stop
Destination.transform.Rotate(0, rotate * Time.deltaTime, 0);
}
i need the camera to rotate 90 degrees in one second when i click on the box(link)
thanks for your help
Thomas
system
2
Ummm, add a timer ?
OnMouseDown()
{
active Timer = 60;
}
update()
{
if( activeTimer > 0 )
{
activeTimer -= Time.deltaTime;
//do rotation
}
}