So currently my camera controls seem to be inverted, hitting the left arrow turns the camera right and vice versa. I do not want this, I want the camera to turn the direction hit. How do I convert my code to do that below:
Pretty sure I need to replace the Input.GetAxis.
public Transform target;
public Vector3 offset;
public float zoomSpeed = 4f;
public float minZoom = 5f;
public float maxZoom = 12f;
public float pitch = 2f;
public float currentZoom = 8f;
public float yawSpeed = 100f;
public float currentYaw = 180f;
private void Update()
{
currentZoom -= Input.GetAxis("Mouse ScrollWheel") * zoomSpeed;
currentZoom = Mathf.Clamp(currentZoom, minZoom, maxZoom);
currentYaw -= Input.GetAxis("Horizontal") * yawSpeed * Time.deltaTime;
}
private void LateUpdate()
{
transform.position = target.position - offset * currentZoom;
transform.LookAt(target.position + Vector3.up * pitch);
transform.RotateAround(target.position, Vector3.up, currentYaw);
}