Remove redundant code

This commit is contained in:
nlitkowski 2021-12-20 00:12:11 +01:00
parent 34f1c3523e
commit 68b5175a37

View File

@ -202,11 +202,11 @@ public class Main : MonoBehaviour
[System.Diagnostics.CodeAnalysis.SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Unity method")]
void Update()
{
Vector3 lookAt = new Vector3(500f + m_camLookAtX, 1f + m_camLookAtY, 500f + m_camLookAtZ);
newCameraPosX = m_CameraR * Mathf.Cos(camera_rotation) + 500f + m_camPosX;
newCameraPosY = 10f + m_camPosY;
newCameraPosZ = m_CameraR * Mathf.Sin(camera_rotation) + 500f + m_camPosZ;
Vector3 pos = new Vector3(newCameraPosX, newCameraPosY, newCameraPosZ);
Vector3 lookAt = new Vector3(500f + m_camLookAtX, 1f + m_camLookAtY, 500f + m_camLookAtZ);
mainCamera.GetComponent<Camera>().fieldOfView = m_FieldOfView;
mainCamera.GetComponent<Camera>().transform.position = pos;
@ -229,8 +229,8 @@ public class Main : MonoBehaviour
directionalLight.GetComponent<Light>().intensity = m_LightIntensity;
textureCamera.GetComponent<Camera>().fieldOfView = m_FieldOfView;
textureCamera.GetComponent<Camera>().transform.position = new Vector3(newCameraPosX, newCameraPosY, newCameraPosZ);
textureCamera.GetComponent<Camera>().transform.LookAt(new Vector3(500f + m_camLookAtX, 1f + m_camLookAtY, 500f + m_camLookAtZ));
textureCamera.GetComponent<Camera>().transform.position = pos;
textureCamera.GetComponent<Camera>().transform.LookAt(lookAt);
//textureCamera.transform.RotateAround(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 1.0f, 0.0f), 1);
}