void Start() { pContr = GameObject.FindWithTag("Player").GetComponent<PlayerController>(); scrPC = GetComponent<PointingCamera>(); scrMOI = GetComponent<MouseOrbitImproved>(); mLook = GameObject.FindWithTag("Player").GetComponent<MouseLook>(); }
// Use this for initialization void Start () { Vector3 angles = transform.eulerAngles; x = angles.y; y = angles.x; rigidbody = GetComponent<Rigidbody>(); // Make the rigid body not change rotation if (rigidbody != null) { rigidbody.freezeRotation = true; } scrPIC = gameObject.GetComponent<PointingCamera>(); }