Menu

#91 Allow joystick axis binding from "Setup Controls" screen

open
nobody
None
5
2019-07-09
2019-07-09
No

I have a PS2 joystick connected through an USB adapter, with two analog sticks. I wanted to bind the left analog to move / strafe, and the right analog to turning left and right / aiming up and down.

According to Doom Legacy Docs (Player Controls), I can achieve that through the command "bindjoyaxis", and after a lot of tweaking (more details here), those commands have done the job for me (ignore the comments):

bindjoyaxis 0 0 0 3 0.001000 // 1st controller, Player 1, Strafe left / right, left analog stick
bindjoyaxis 0 1 0 1 -0.001000 // 1st controller, Player 1, Forward / backward, left analog stick
bindjoyaxis 0 4 0 2 -0.020000 // 1st controller, Player 1, Look left / right, right analog stick
bindjoyaxis 0 3 0 0 -0.500000 // 1st controller, Player 1, Look up / down, right analog stick (optional)

bindjoyaxis 1 0 1 3 0.001000 // 2nd controller, Player 2, Strafe left / right, left analog stick
bindjoyaxis 1 1 1 1 -0.001000 // 2nd controller, Player 2, Forward / backward, left analog stick
bindjoyaxis 1 4 1 2 -0.020000 // 2nd controller, Player 2, Look left / right, right analog stick
bindjoyaxis 1 3 1 0 -0.500000 // 2nd controller, Player 2, Look up / down, right analog stick (optional)

Currently, that can be done only through console commands, or by editing "config.cfg" manually. However, it'd be interesting to allow users to configure those settings directly from "Setup Controls" screen, just like other control bindings such as Fire, Open, etc.

ZDoom has this implemented, as you can see in the screenshot I've sent in the attachments. That is a example of how it would be in the menus.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.