RenaKunisaki / CSL-JoystickCameraControl

Cities: Skylines mod to control camera with joystick
MIT License
2 stars 0 forks source link

Game Misinterpreting Joystick Axis Readings #5

Open Canis-Enigmas opened 4 years ago

Canis-Enigmas commented 4 years ago

I have a Logitech G13 that has it's thumb joystick that I'm trying to use with this mod. However, Unity Input Manager readout in the Devices tab is showing Horizontal: 80 to 90 Vertical: -80 to -100 when the joystick is left alone dead center. As a result, my game is always flying off to the far bottom right of the map without me touching anything. Trying to get it to stay still would require me to position the joystick somewhere halfway between extreme top-left position.

I've tried repeatedly to calibrate it in Windows' Game Controller window, but it looks like it isn't a Windows or device problem as the calibration tests all show the joystick is still dead accurate and reliable and I still can use it outside the game without issue.

I suspect that the game or Unity is thinking the device is reporting a single range per X & Y axis or something of that sort. Is this something wrong with Unity Input Manager or something I have to manually configure for it to recognize the device axis reporting correctly?

RenaKunisaki commented 4 years ago

You should be able to compensate by adding an offset, or by enabling Scan for USB Devices and using the joystick directly instead of through Unity.

Canis-Enigmas commented 4 years ago

No, neither of these options do anything. Scan for USB Devices pops up a additional X & Y Axis readout in Devices, but the joystick readouts are fluctuating in the Unity Input Manger's Horizontal and Vertical fields. The Offset option doesn't do anything to them at all.

Even worse still, whenever I switch anything in the Inputs tab, the result is clicking my mouse button will position it's cursor dead center on the screen and send the click event there. Rendering my only control in the game completely useless, leaving me with Ctrl-Alt-Del as the only way to do anything and exit the game.

RenaKunisaki commented 4 years ago

I think you should still be able to quit the game using Alt+F4?

Can you take a screenshot of each of the settings tabs so I can understand exactly how you have it set up?

On Sun., May 17, 2020, 09:28 Canis Enigmas, notifications@github.com wrote:

No, neither of these options do anything. Scan for USB Devices pops up a additional X & Y Axis readout in Devices, but the joystick readouts are fluctuating in the Unity Input Manger's Horizontal and Vertical fields. The Offset option doesn't do anything to them at all.

Even worse still, whenever I switch anything in the Inputs tab, the result is clicking my mouse button will position it's cursor dead center on the screen and send the click event there. Rendering my only control in the game completely useless, leaving me with Ctrl-Alt-Del as the only way to do anything and exit the game.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RenaKunisaki/CSL-JoystickCameraControl/issues/5#issuecomment-629798763, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJBOMOOCEXNQ62CSXPKLP3RR7Q7JANCNFSM4NC2ZYWQ .

Canis-Enigmas commented 4 years ago

This is what my initial settings are: image image

Note the joystick is left dead center and these are the readouts: image I've set the Offset settings for the Horizontal and Vertical inputs to the extreme settings image But nothing changes image The mouse locking in the center seems to only occur in game. It doesn't occur in the Main Menu.

RenaKunisaki commented 4 years ago

I see. This might be an issue with Unity itself. Those inputs come from the game, and I don't think it's possible to override them. There might be settings within Steam to stop Unity from using the joystick; it should still work with the mod.

Canis-Enigmas commented 4 years ago

Damn. Are there any guides or tools you could suggest or point me to search for? I don't have any knowledge of Unity's design or development.