Local multiplayer input

Cheo

Active member
Hello, I tried to give split screen local multiplayer a try for the first time, following the setup process on this page : https://opsive.com/support/documentation/ultimate-character-controller/camera/split-screen/

While there is no issue with the cameras, so far the only input that can work on each character is the jump input. It's not possible to aim, move the character or the camera with either the keyboard or gamepad. I should mention that I use the Input System integration and use the Keyboard&Mouse scheme for player 1 and Gamepad for player 2. The same basic setup works in a separate scene with objects with a basic controller script and Player Input components attached.

Seeing that the second character in the Split Screen section of the demo scene is an AI one, the first question that comes to my mind is : was local split screen multiplayer tested and confirmed to be working in UCC3 ? If yes, am I missing something that would enable movement and camera control for both characters ?

Lemme know if I must provide more details or make a video, thanks.
 
You will definitely need to use the input system for this since it handles key bindings better. Beyond that did you map the correct gamepad to the player within the input system component?
 
All I did was set the Default Scheme for each Player Input component (see attached pictures), nothing more, it was enough when I did a test with a basic controller, and since both the Space key and Button South trigger the jump ability my thinking was that the first step of getting the keyboard and gamepad each tied to a player was already automatically done. If I need to do some more advanced stuff related to the input system in a script then I'll definitely look into that myself, but for the moment allow me to ask again if local multiplayer is confirmed to be possible in UCC3 ?
 

Attachments

  • Screenshot (2305).png
    Screenshot (2305).png
    457.9 KB · Views: 4
  • Screenshot (2304).png
    Screenshot (2304).png
    459 KB · Views: 4
It has been awhile since I test it but it did work with the input system. I think that the easiest way to start to debug this is to output the values from UnityInputSystem.GetButtonDown to see if it is using the right action map:

Code:
                UnityEngine.Debug.Log(gameObject + " " + action + " " + m_PlayerInput.currentActionMap);
 
Back
Top