using UnityEngine;
using System.Collections;

public class CameraMovementScript: MonoBehaviour {

	public Transform generateObject;
	public float rotateSpeed;
	public bool locked;
	
	// Update is called once per frame
	void FixedUpdate () {
		if (!locked) 
		{
			float horizontal = Input.GetAxis ("Mouse X") * rotateSpeed;
			generateObject.transform.Rotate(new Vector3(0,0,-horizontal*Time.deltaTime));
		}
		GameObject.Find ("Main Camera").GetComponent<RaycastScript> ().checkLock ();
	}
}
