Search Unity

Camera spinning with joystick setup

Discussion in 'Cinemachine' started by vtambini, May 18, 2022.

  1. vtambini

    vtambini

    Joined:
    Jul 11, 2016
    Posts:
    4
    Hi, I was trying to find a solution for my issue, but it seems there's no direct answer yet.

    I'm using Cinemachine and I set up Joystick inputs to control my camera. I'm using the same "Mouse X" and "Mouse Y" names, so the player can choose between joystick or keyboard/mouse.

    Mouse Y (vertical orbit) works fine. It goes up and down just fine. Mouse X however keeps spinning to the right as soon as I hit play. I noticed that Mouse X has a value of -1 when I press play.
    I tried changing the dead zone to 0.19 (default one for joysticks) it didn't work. Then I tried 0.9999 (it didn't work), then I tried 1 and it fixed the spinning issue, however I can only rotate to the left (value 1), when I try to rotate right the value stays on 0.

    I tested my controller and it looks like the sensitive is working and I never had any issue with it. So I assume this is not hardware.

    Can anyone help me, please?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Can you show the full inspector of your vcam?
     
  3. vtambini

    vtambini

    Joined:
    Jul 11, 2016
    Posts:
    4
    Of course! I added both Inspector of Cinemachine and the settings of Input Manager.
     

    Attached Files:

  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Feels like your X axis speed is very high. Did you try turning it down?

    upload_2022-5-18_12-45-53.png

    I don't have a joystick, so I can't comment on your input setup. Mine looks like this and works well with the mouse:

    upload_2022-5-18_12-50-39.png

    How does your setup work with the mouse?
    You might want to ask about this on the input forum.
     
    Last edited: May 18, 2022
  5. vtambini

    vtambini

    Joined:
    Jul 11, 2016
    Posts:
    4
    Actually the value 500 for speed is not too high, since my idea is to use mouse or joystick.
    In any case, I just tested it with a value of 10 and it's super slow either for a mouse or joystick.
    And the problem is still there, the camera is spinning to the right but super slowly.

    The setup works fine with a mouse.

    I'll ask this in the input forum, then. Thank you :)


    EDIT (SOLVED): I figured this out. I had another joystick plugged in my computer. I removed that device and it works now. I hope this can help others :)
     
    Last edited: May 18, 2022
    Gregoryl likes this.