public static void RotateTo(GameObject target, Hashtable args)
{
//clean args:
args = iTween.CleanArgs(args);
//additional property to ensure ConflictCheck can work correctly since Transforms are refrences:
if(args.Contains("rotation")){
if (args["rotation"].GetType() == typeof(Transform)) {
Transform transform = (Transform)args["rotation"];
args["position"]=new Vector3(transform.position.x,transform.position.y,transform.position.z);
args["rotation"]=new Vector3(transform.eulerAngles.x,transform.eulerAngles.y,transform.eulerAngles.z);
args["scale"]=new Vector3(transform.localScale.x,transform.localScale.y,transform.localScale.z);
}
}
//establish iTween
args["type"]="rotate";
args["method"]="to";
Launch(target,args);
}