Hi there!
I got this error
Cannot cast from source type to destination type.
when I use this script to move the camera
function OnMouseEnter()
{
//Camera.main.GetComponent(CameraMover).MoveToPosition();
camPosX = cam.transform.position.x;
camPosY = cam.transform.position.y;
if(!isActive) iTween.moveTo(cam,{"y":(camPosY+100), "x":(camPosX + 100) , "time":2, "transition":"easeOutExpo"});
toggleActive();
}
function OnMouseExit()
{
if(isActive) {
iTween.stop(cam);
iTween.moveTo(cam,{"y":camPosY, "x":camPosX, "time":1, "transition":"easeOutExpo", "onComplete": toggleActive});
}
}
function toggleActive()
{
isActive = !isActive;
Debug.Log("isActive: " + isActive);
}
Why is that?
Thnx!