I am currently working on tryting to create a free look camera which is controlled by the “e” and “q” keys. Ideally the keys would rotate the camera 90 degrees. However I seem to be running in a few porblems. Could someone help me? Attached is the script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class OrbitControl : MonoBehaviour
{
public CinemachineFreeLook freeLookCam;
// Start is called before the first frame update
void Start()
{
}
void Update()
{
Debug.Log(freeLookCam.m_XAxis.Value);
if (Input.GetKey("e"))
{
freeLookCam.m_XAxis.Value = -90f;
}
if (Input.GetKey("q"))
{
freeLookCam.m_XAxis.Value = 90f;
}
}
}