how can i make a area in the screen to where the mouse will not cause the player rotate
C#
using UnityEngine;
using System.Collections;
public class MouseLook : MonoBehaviour {
public float mouseLook = 1.0f;
public int edgeBoundry = 10;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKey(KeyCode.Escape)){
Application.Quit();
}
if (Input.mousePosition.x < Screen.width / edgeBoundry) {
if (transform.position.z > -4) {
transform.Rotate (Vector3.down * mouseLook);
}
}
if (Input.mousePosition.x > Screen.width / edgeBoundry) {
if(transform.position.z < 8){
transform.Rotate(Vector3.up * mouseLook);
}
}
if (Input.mousePosition.x > Screen.width / edgeBoundry) {
if(transform.position.z > -4 || transform.position.z < 8){
transform.Rotate(Vector3.zero);
}
}
}
}