Search Unity

Question Freelook Input Provider stops working when Player Input component added to player

Discussion in 'Cinemachine' started by MattMurch, Sep 2, 2022.

  1. MattMurch

    MattMurch

    Joined:
    Jul 29, 2012
    Posts:
    14
    Hi, I'm trying to use the new Input System with Cinemachine (Unity 2020.3.23f1, Cinemachine 2.6.17, Input System 1.0.2) but our Freelook camera is broken.

    We have a freelook camera with the Input Provider component, and a it follows our player object that uses the Player Input component.

    The freelook camera doesn't respond to any mouse movement unless I disable the Player Input component in editor mode. After that the Freelook works perfectly. Disabling the Player Input component in Play Mode dosent change anything.

    Has anyone run into this issue or found a solution to this?

    Player.png

    Freelook.png
     
    DoubleMDigital likes this.
  2. MattMurch

    MattMurch

    Joined:
    Jul 29, 2012
    Posts:
    14
    I think we figured it out! Thanks to the info from these posts:
    This didn't solve it for us, but was useful context: https://forum.unity.com/threads/delta-mouse-not-adding-values-via-cinemachineinoutprovider.978009/
    This is what led us to our solution: https://www.reddit.com/r/Unity3D/comments/qsolsd/new_input_system_mouse_delta/

    We tried a PS5 Controler and realized the cam worked fine, so it had to be our mouse input that was messed up. Our keyboard control scheme needed to have both Keyboard and Mouse options added to it.

    To get to the settings go to:
    Input Action Dialogue > Control Scheme dropdown (top left) > Select your Scheme (or add a new one) > Click the dropdown again > Edit Control Scheme
     

    Attached Files: