Top-Down Character Controller with Gamepad

Loran

New member
Hi,

I'm using UCC top-down character controller.
It works well with WASD+Mouse but it doesn't work with a gamepad: the character moves with the left joystick but it doesn't rotate with the right joystick.

You can reproduce the bug with the demo scene in the top-down area.

Unity 2021.3.15f1, UCC 3.0.3

Thanks,
Loran
 
The top down perspective is setup for a mouse/keyboard with the cursor shown. In the demo scene if you want to change that you can remove the TopDown state on the UnityInput component and also disable Mouse Controller Update on the Unity Input component. This will prevent the mouse location from being retrieved.
 
Ok, this will prevent the mouse location from being retrieved. But will it enable the right joystick of the gamepad?
 
@Justin I think there may still be an error here?

in PlayerInput.Update(), I can see how it switches between controller type to set the LookVector (with the setup you describe above). This appears to work correctly.

However, both Pseudo3d and TopDown ViewTypes (perhaps others) are directly accessing via m_PlayerInputGetAxis() the mouse input values not the controller ones. I imagine that either IPlayerInput needs to include the ControllerLookInputNames (and the viewtype discriminates on use based on ControllerConnected/CursorVisible) or the viewtypes should be accessing the LookVector or similar directly with control of the update method managed on the PlayerInput as you describe above?
 
Giving extra thought to this, whatever your solution to the issues mentioned above, I think it would be good to add the controller look names to IPlayerInput for additional future flexibility?
 
Top