コード例 #1
0
        protected override void Awake()
        {
            base.Awake();

            iniRot      = transform.eulerAngles;
            charScript  = FindObjectOfType <TombiCharacterController>();
            collCapsule = charScript.GetComponent <CapsuleCollider>();
            // Set initial rotation and distance
            Rotation.Rotate(InitialHorizontalRotation, InitialVerticalRotation);
            _previousDistance = DesiredDistance;

            // Then let update handle everything
            UpdateCamera();
            CameraTransform.ApplyTo(Camera);

            Debug.Log("Test");
        }
コード例 #2
0
        void Update()
        {
            UpdateCamera();

            CameraTransform.ApplyTo(Camera);
        }
コード例 #3
0
        void Update()
        {
            UpdateCamera();

            CameraTransform.ApplyTo(Camera); // Apply the virtual transform to the actual transform
        }