Search Unity

Inverted Mouse Sensitivity

Discussion in 'Cinemachine' started by godonan, Oct 15, 2021.

  1. godonan

    godonan

    Joined:
    Jan 17, 2019
    Posts:
    2
    Am using Cinemachine Package v2.8.1

    I am attempting to use Cinemachine as a 3rd person camera view. The desired effect is for the camera to be locked looking at the player in the center of the screen, and for the camera rotation to be controlled by the mouse.

    I'm running into a weird problem where the sensitivity seems seems to be inverted(?). As in, moving my mouse slowly across my mousepad rotates the camera fast, but moving the mouse faster causes the rotation speed to slow down. Maybe I accidentally toggled some setting, see below. Also tested with multiple mice just in case.

    This appears on both CinemachineBrain's Fixed Update and Late Update settings.

    Attached are my Cinemachine settings.
     

    Attached Files:

  2. godonan

    godonan

    Joined:
    Jan 17, 2019
    Posts:
    2
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I'm guessing that this might have something to do with the way you set up the input. Can you show that?
     
  4. IndieWafflus

    IndieWafflus

    Joined:
    Jul 26, 2021
    Posts:
    24
    I'm currently having the same problem, I'm using the new Input System and am getting a Value of type Vector2 with no Processors, the value I'm getting is the Delta [Mouse].

    I've achieved an okayish movement with some smoothness in a free look camera using a specific Speed (with Max Speed option selected, as I couldn't achieve a smooth movement using the Input Value Gain, for some reason, likely due to me not knowing a lot about cinemachine) and Accel/Decel Times.

    However, when I move the mouse slowly it will move the camera fast and when I move the mouse fast it will move the camera slowly.

    I would like a 1 to 1 sensitivity with the mouse (the faster I start moving the mouse, the faster the camera rotates) while still doing a smooth rotation (which Accel and Decel seem to help with).

    I couldn't get a slow Y axis movement even with the speed at 0.001 in the Input Value Gain option.

    I know it's been a while and the origin poster didn't answer, but as I'm having the same problem I wonder if there's anything I can do to achieve what I desire.
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    The Y axis value ranges from 0 to 1, while the X axis is 0 to 360. So you need to scale the input differently. Add some debug log messages so you can find out what the Input is feeding you. You might want to add some processors to the input to wrangle the value into a range you can work with. Then, in CM, use InputValueGain, and set the speed (which is just a multiplier on the input value). Keep the accel/decel low if you want a 1:1 feeling.
     
    IndieWafflus likes this.
  6. IndieWafflus

    IndieWafflus

    Joined:
    Jul 26, 2021
    Posts:
    24
    Hi! Thanks for the reply.

    I didn't need to add any processor do the input (it returns over 1 on any axis, I've seen -300+ and 300+) but it was my fault.

    Turns out the camera in the Editor using the Input Value Gain is quite jittery / snappy sometimes (I'm using the new Input System and have attached the Cinemachine Input Provider component, not sure if that changes anything regarding the jitter), but isn't in the build, so I simply had to build the game every time I updated the values to see if they were what I wanted.

    I was able to get around the values I wanted using the Input Value Gain, here are a few screenshots in case anyone is wondering how I've set mine up (note that I only wanted the sensitivity to be inverted like the original poster, not really 1:1):

    upload_2021-11-26_14-57-28.png upload_2021-11-26_14-57-46.png
     
    Last edited: Nov 26, 2021