Search Unity

Mouse Sensitivity changes?

Discussion in 'Cinemachine' started by SpookyCat, Jan 6, 2018.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,768
    Having another issue with the cool Cinemachine, I have a Free Lock camera and have set the accel and decal values to give the right feel for my camera and testing in the editor its great, I then do a build and I have to move the mouse much further to get the same effect, ie in the editor moving the mouse cursor the width of my mouse map rotates the scene 7 complete times, in the build it only rotates it 1.5 times. What am I doing wrong or how do I fix that?

    Also in the Free Look camera why does the Max Speed for the x axis have to be so high compared to the y axis, it seems strange to have a different set of values for the x and y axis when both are using the same mouse.
     
    Last edited: Jan 6, 2018
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    The max speed is in units/second, and will naturally be different if the number of units in the value range is different. The X axis range is 360 units, while the Y axis range is 1 unit.

    I tried one of the CinemachineExample scenes (Free Look character.unity) in play and in build, and I get the same mouse behaviour for both. Note that the max speed setting makes a difference. For example, the X axis default value of 300 means that if you move the mouse very fast across the screen, it won't turn much because most of your velocity is getting clamped down. If you move slowly, it will turn more because you have more time at max speed.

    What settings are you using in the FreeLook? Can you repro your issue with the example scene?
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,768
    It is the same if the frame rate is the same in the build as in the editor, ie you have vsync on but if you dont have vsync on and in editor the game runs at 100fps but runs at 500fps in a build there is a definite difference in how quickly the camera moves in each. Ok fine most game will be locked to a rate or vsync but why should there be a difference?
     
  4. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    I came here looking for info on setting the mouse sensitivity when using cinemachine and instead I find this brick wall...

    I'm anxious to read Unity's reply on your issues SpookyCat.
     
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,768
    You may be waiting a while, I posted a year ago and no further response so far.
     
  6. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Really? omg... and did you send him that sample scene he asked for?

    Regarding the camera's speed being affected by framerate, did you try setting cinemachine to FixedUpdate?

    If it does its thing in update (and depending how cinemachine is coded) a high fps could make your mouse accelerate to full speed sooner which in turn could translate in more movement for the same physical input (because of more time spent at full axis speed).

    Let me know if that makes any sense!

    Fred.
     
    Last edited: Jan 13, 2019
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,768
    In that project setting to FixedUpdate sent Cinemachine CPU use through the roof, we stopped using it.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Yeah... some posts drop off the radar sometimes... :oops:
    A little poke like this one can often help.

    One thing you can try: drive the FreeLook's axes yourself. Remove the axis name settings from the vcam, and add your own script to manipulate X and Y axis value. The units for X axis are degrees, and Y is axis 0...1.
     
  9. TerranRich

    TerranRich

    Joined:
    May 7, 2018
    Posts:
    5
    It's weird, because no game that I've played has ever had a camera that handles like this.

    Can we get Cinemachine to behave like a regular gaming camera, where your mouse speed has a direct (instead of inverse) relationship with the camera speed? If so, how is that set up?
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    upload_2021-5-25_8-15-52.png
     
    mg5x and talha-safdar like this.
  11. Prazo20

    Prazo20

    Joined:
    Jul 9, 2022
    Posts:
    10
    Thank you so much for this solution really worked like a charm
     
  12. talha-safdar

    talha-safdar

    Joined:
    May 28, 2022
    Posts:
    7
    Whenever I see your picture, I know I found the answer to my problem. Thanks!
     
    Gregoryl likes this.