using UnityEngine;
using System.Collections;
public class Look : MonoBehaviour {
private Vector3 inputRotation;
private Vector3 mousePlacement;
private Vector3 screenCentre;
void Update () {
FindCrap();
transform.rotation = Quaternion.LookRotation(inputRotation);
}
void FindCrap () {
screenCentre = new Vector3(Screen.width * 0.5f,0,Screen.height * 0.5f);
mousePlacement = Input.mousePosition;
mousePlacement.z = mousePlacement.y;
mousePlacement.y = 0;
inputRotation = mousePlacement - screenCentre;
}
}
That should give you what you need, incorporate it into your script attached to the to of the tank.