Hello,
I need an animation to play when my object is finished using iTween.LookTo. Is there a way to tell if my object has rotated to the lookTo spot?
any ideas would be great.
var armHolder : GameObject;
function Update(){
var hit : RaycastHit;
var ray : Ray = camera.ScreenPointToRay (Input.mousePosition);
if(Input.GetButtonDown("Fire1")){
MoveArm(hit.point);
}
}
function MoveArm(hitSpot : Vector3){
iTween.LookTo (armHolder,hitSpot,.5);
//When the Tween is finished I'd like the animation to play//
}