Search Unity

Resolved CInemachine Input Provider only using first players input in Splitscreen multiplayer.

Discussion in 'Input System' started by nemo_dev, Jun 20, 2022.

  1. nemo_dev

    nemo_dev

    Joined:
    Jun 16, 2021
    Posts:
    4
    I am trying to set up split-screen multiplayer for my game. I use the Player Input component and Player Input manager component with the new input system to spawn in my players. The camera and virtual camera are part of the player wrapper prefab. The camera is controlled by an aiming script. The script makes two Cinemachine.AxisState objects for the X and Y axis. The script then binds the Cinemachine Input provider to the axis states. The axis states are updated every fixed update. The rotation of the object the virtual camera is following is then rotated based on the values of the two axis states. This works great for single player with both Controller and Mouse input.
    However, when I split the screen and add a second player, The camera of the first and second player are controlled by only the input of the first player. I tried setting the Player Index property on the CinemachineInputProvider, however no matter what index I put I have the same problem. The other controls for walking and aiming don't have the same issue, but they are handled separately.
    Am I missing something, or is this a bug with Cinemachine?? upload_2022-6-19_22-31-34.png
     
  2. nemo_dev

    nemo_dev

    Joined:
    Jun 16, 2021
    Posts:
    4