I’m a noob in scripts, and I’m getting this error on this script:
function Update () {
if(Input.GetMouseButtonDown(0))
{
bDragging = true;
oldPos = transform.position;
panOrigin = Camera.main.ScreenToViewportPoint(Input.mousePosition);
}
if(Input.GetMouseButton(0))
{
Vector3 //Unity says there should be an semicolon right here// pos = Camera.main.ScreenToViewportPoint(Input.mousePosition) - panOrigin;
transform.position = oldPos + -pos * panSpeed;
}
if(Input.GetMouseButtonUp(0))
{
bDragging = false;
}
}
Unity is giving me this error, and as far as I know, that error shouldn’t happen. Can someone help me?