private void SetFacing(Vector3 forward) { // Set player facing direction if (mainCamera) { PlayerMouseLook mouseLook = mainCamera.GetComponent <PlayerMouseLook>(); if (mouseLook) { mouseLook.SetFacing(forward); } } }
void Start() { dfUnity = DaggerfallUnity.Instance; streamingWorld = GameObject.FindObjectOfType <StreamingWorld>(); playerEnterExit = GetComponent <PlayerEnterExit>(); playerGPS = GetComponent <PlayerGPS>(); playerMotor = GetComponent <PlayerMotor>(); playerMouseLook = GameObject.FindObjectOfType <PlayerMouseLook>(); titleScreen = GameObject.FindObjectOfType <ShowTitleScreen>(); // Get starting run speed if (playerMotor) { startRunSpeed = playerMotor.runSpeed; } }