RotateGameObject.cs 295 Bytes
using UnityEngine;

public class RotateGameObject : MonoBehaviour {

	public float RotationVariable = 4.0f;
	public float RotateLeftRight = 0.0f;

	void OnMouseDrag()
	{
		transform.Rotate(0.0f, -RotateLeftRight, 0.0f);
		RotateLeftRight = Input.GetAxis ("Mouse X") * RotationVariable;
	}

}