Currently trying to integrate Cinemachine free look Camera into my game. However, I don’t know how to code Cinemachine to only move camera upon button depression. Cinemachine freelook has built in Mouse movement. I don’t want the camera to move without depressing a key like : right-click. Anyone understand Cinemachine and scripting well enough to explain how to do this?
you can modify and overide cinemachine axis values in a script like follows
using UnityEngine;
using Cinemachine;
public class Test : MonoBehaviour
{
public CinemachineFreeLook cine; //Drop your cinemachine camera on inspector
void Update()
{
if (Input.GetMouseButton(1)) //give whatever the condition you want
{
cine.m_XAxis.m_InputAxisValue = Input.GetAxis("Mouse X");
cine.m_YAxis.m_InputAxisValue = Input.GetAxis("Mouse Y");
}
}
}