Hi, I Wanted to try to make a first person camera with cinemachine, but I don’t know how to change the sensitivity of the camera (with a slider in the game, for example). I thought the easiest way to change it would be changing the legacy gain value. Is that possible? Thanks in advance.
var axisController = GetComponent<CinemachineInputAxisController>();
foreach (var c in axisController.Controllers)
{
if (c.Name == "the one I want")
{
c.Input.LegacyGain = bla;
break;
}
}
2 Likes
Thank You soo much!!!
Thanks for fast response but what about acceleration and deceleration controll?
Instead of c.Input.LegacyGain = bla; do c.Driver.AccelTime = bla;
Also it only made LookX(Pan) to 0 but not LookY(Tilt), i was still able to controll tilt
You need to do this for each axis that you are interested in. “The one I want” will be more than one.
Thanks
foreach (var c in inputAxisController.Controllers)
{
if (c.Name == “Look X (Pan)”)
{
c.Input.Gain = 0f;
}
if (c.Name == “Look Y (Tilt)”)
{
c.Input.Gain = 0f;
}
}
don’t use break; and we are good, Thanks