private void inspectMode() { if (Input.GetMouseButton(0)) { onMouseDrag(); } if (Input.GetAxis("Mouse ScrollWheel") > 0f) { MasterScript.CAM1.GetComponent <Camera>().fieldOfView -= zoomSpeed * Time.deltaTime; } else if ((Input.GetAxis("Mouse ScrollWheel") < 0f)) { MasterScript.CAM1.GetComponent <Camera>().fieldOfView += zoomSpeed * Time.deltaTime; } if (CastRay.Shoot(this.GetComponent <Camera>(), inspectLayer, shootRange)) { if (CastRay.detected.GetComponent <Inspectable>() != null) { MasterScript.EnableCrosshairAll(); Inspectable inspectableScript = CastRay.detected.GetComponent <Inspectable>(); MasterScript.toast(inspectableScript.text); if (Input.GetKeyDown(KeyCode.E)) { Inspectable.useInspectable(); } } else { MasterScript.inactive(); } } // shoot close else //if nothing is hit { MasterScript.inactive(); } }