Esempio n. 1
0
 void Change_Camera_Settings(CameraPoint cameraPointClass)
 { // Called from "Camera_Points_Manager_CS".
     targetFOV  = cameraPointClass.FOV;
     currentFOV = targetFOV;
     Main_Camera.fieldOfView   = currentFOV;
     Main_Camera.nearClipPlane = cameraPointClass.Clipping_Planes_Near;
     enableThisFunction        = cameraPointClass.Enable_Zooming;
 }
 void Change_Camera_Settings(CameraPoint cameraPointClass)
 {     // Called from "Camera_Points_Manager_CS".
     if (cameraPointClass.Rotation_Type == 1)
     { // Third person
         enableThisFunction = cameraPointClass.Enable_Avoid_Obstacle;
         return;
     }
     // (Note.) This function is only for Third Person View.
     enableThisFunction = false;
 }
Esempio n. 3
0
 void Change_Camera_Settings(CameraPoint cameraPointClass)
 {     // Called from "Camera_Points_Manager_CS".
     if (cameraPointClass.Rotation_Type == 1)
     { // Third person
         enableThisFunction = cameraPointClass.Enable_PopUp;
         if (enableThisFunction)
         {
             currentHeight = 0.0f;
             targetHeight  = currentHeight;
         }
         return;
     }
     // (Note.) This function is only for Third Person View.
     enableThisFunction = false;
 }
Esempio n. 4
0
        void Change_Camera_Settings(CameraPoint cameraPointClass)
        { // Called from "Camera_Points_Manager_CS".
            currentCameraPoint = cameraPointClass;

            // Set the initial angles.
            switch (currentCameraPoint.Rotation_Type)
            {
            case 0:     // Not allowed.
                thisTransform.localEulerAngles = baseAngles;
                break;

            case 1:     // Third Person.
                targetAngles.x = 0.0f;
                targetAngles.y = thisTransform.eulerAngles.y;
                currentAngles  = targetAngles;
                break;

            case 2:     // First Person.
                targetAngles.x = 0.0f;
                targetAngles.y = thisTransform.eulerAngles.y - currentCameraPoint.Camera_Point.eulerAngles.y;
                currentAngles  = targetAngles;
                break;
            }
        }