private void Start() { // Saving component references to improve performance. m_Transform = GetComponent <Transform>(); m_Controller = GetComponent <CharacterController>(); // Setting initial values. m_Speed = m_WalkSpeed; m_RayDistance = m_Controller.height * .5f + m_Controller.radius; m_SlideLimit = m_Controller.slopeLimit - .1f; m_JumpTimer = m_AntiBunnyHopFactor; if (playerCamera == null) { playerCamera = Camera.main.gameObject.transform; } playerLook.Init(transform, playerCamera); }