[Cinemashine] Remove the camera damping effect

Good afternoon, I’m working on a small 3D project and encountered an issue with Cinemashine. I want the camera to stop immediately as soon as I stop the cursor, but it continues to move slowly. Additionally, the damping speed varies for some reason when zooming in, and overall, it sometimes differs. The video doesn’t show the best example, but sometimes the smoothness of the rotation is just off the charts. How can I remove this effect?

https://youtu.be/GhJlJliCHgc

Since the built-in zoom refused to work, I wrote my own small script, but disabling it doesn’t lead to the desired result, which means it’s not the culprit.


        [SerializeField] [Range(0f, 10f)] private float defaultDistance = 4.5f;
        [SerializeField] [Range(0f, 10f)] private float minumumDistance = 1f;
        [SerializeField] [Range(0f, 10f)] private float maximumDistance = 6f;

        [SerializeField][Range(0f, 10f)] private float smoothing = 4f;
        [SerializeField][Range(0f, 10f)] private float zoomSensitivity = 2.5f;

        private CinemachineOrbitalFollow transposer;
        private CinemachineInputAxisController provider;

        private float currentDistance = 0.0f;
        private void Awake()
        {
            transposer = GetComponent<CinemachineOrbitalFollow>();
            provider = GetComponent<CinemachineInputAxisController>();
            currentDistance = defaultDistance;
        }

        private void Update()
        {
          Zoom();
        }

        float RoundToHundredths(float value)
        {
            return Mathf.Round(value * 100f) / 100f;
        }

        private void Zoom()
        {
      
            float zoomValue = RoundToHundredths( provider.Controllers[2].InputValue * zoomSensitivity);
            currentDistance = Mathf.Clamp(currentDistance- zoomValue, minumumDistance, maximumDistance);
            var curr = transposer.Radius;
            if (curr == currentDistance) return;

            float lerpedZoom = Mathf.Lerp(curr, currentDistance, smoothing * Time.deltaTime);
            transposer.Radius = lerpedZoom;


     
        }

Additionally, I modified the accel time and deccel time values in Look orbit X, but I didn’t achieve the desired result. Is this a mistake? :slight_smile:

Probably you want to reduce the Z damping in the Orbital Follow component.
For the radial axis, by default the range is 1…1, so it will do nothing. Try giving it a nontrivial range.

1 Like

Thx,
image

It helped, I overlooked the setup)