The joystick development thread

For technical problems with the build. Not for bug reports!

Moderator: SolC Development Leads

User avatar
MadMax1998
Site Admin
Posts: 1555
Joined: 07 Nov 2012, 13:43
Location: Berlin, Germany
Contact:

The joystick development thread

Post by MadMax1998 » 09 Nov 2015, 18:20

This thread is going to mainly be a conversation between me and the three volunteers who are going to receive small build updates dedicated to sorting out joystick issues. The most important to begin with is the handling of (peusdo) one-way axes, followed by UI optimization.

Axis names

To start off, I have connected my Saitek Cyborg EVO which needs no wrapper to work properly, and bound all axes through the UI (menu) to see which axis names it uses. I'd like to confirm with all three of you that your stick (if you can bind it at all) uses the same axis names in our game, or if they are different, which ones they use!

The EVO binds to these:

LeftX = stick X-axis
LeftY = stick Y-axis
RightX = throttle axis
RightY = stick Z-axis (twist)

LeftTriggerAxis, RightTriggerAxis are not bound (stick has only four axes).

If your stick binds to the same axes (most importantly the X/Y-axes of your stick should bind to LeftX and LeftY), then we could potentially name these axes "stick-X" and "stick-Y" in the menu unless people use a controller (there could be an option to select the input type). I'm also curious whether any of your stick's axes bind to LeftTriggerAxis or RightTriggerAxis.

Next, let's talk about how the EVO handles the throttle:

The throttle is a simple forward/backward, circular moving handle. It is a two-way axis, meaning it goes from -1 to +1 with a center of 0. This center is met when the throttle is at the 50% mark (which can not really be seen on this stick; it's with the handle at roughly 45°). This means the position to put this throttle at before binding any axis in our game would have to be 50% because that's 0 input to the game. If I keep my throttle at the "rested" position (as one would on a true one-way axis) and click on a binding field, I'll immediately get RightX as the result. This is what you guys have experienced too, so I want to figure out if your throttles (or whatever axes gave you problems) are indeed one-way or "pseudo-one-way", as in, they LOOK like one-way axes but actually have their 0 position in the middle.

To test this, please do the following things:

Go to your game devices where you can test your stick and move all axes in all directions. Look at how the control panel applet represents the axes: for my EVO; both the throttle and the twist axis are displayed as a progress bar that starts at 50% if these axes are in the 0 position. The bars will move toward 0% if I reduce the throttle to "rested" or twist the stick to the left, and will approach 100% if I give it full throttle or twist to the right.
Now, considering this, judging from the bar representing the throttle axis, one might assume it's a one-way axis where 0% on the bar means 0 input on the axes, while it's *really* -1 on the axis (and in our game) and just looks like 0% on that bar and when you look at the physical throttle handle "resting". However, since the same bar is used for my twist axis as well and I can clearly see by twisting it left/right that the bar being at 50% means the axis is at 0, I can deduct that my throttle axis is probably two-way as well.

So please make extra sure that whatever the control panel is telling you, you are interpreting it correctly. It may look like a one-way axis but might not be one-way.

Next, please go into the game and to the input menu where you bind the axes, and then move whatever axes is the offending one to about 50% of what you'd consider "full throttle". With the axis at 50%, click on a binding field and see if RightX still appears immediately. If it does not, that confirms your axis is in fact a two-way axis and the game behaved correctly all the time as it received an input of -1 when you tried binding this axis earlier, with it being "rested".

Again, for a one-way axis, the rested position would be a true 0%, whereas for a pseudo-one-way axis like my stick's throttle, it's actually -1 and 50% on the axis means 0 input. What is a true one-way axis? A pedal, for example. I do simracing on a Logitech G25 and that one has three pedals, all of which go from 0 to 1 (or 0% to 100%), so they are true one-way axes. But for a stick, this might not be true.

Also make sure you check your manufacturer's software as it may convert two-way axes into one-way or vice versa. Apparently some of you had good luck with the XInput wrapper which allowed you to transform your axes to what the game expects, but we want to find a way to make the game work with your axes!

If you have any problems performing the above tasks, I can probably code up a build that will output your axis movements to the log, so we can really see what's going on in-game as you move your stick around.
Max
Sol Contingency Programming Lead
Sol Contingency Website

User avatar
MadMax1998
Site Admin
Posts: 1555
Joined: 07 Nov 2012, 13:43
Location: Berlin, Germany
Contact:

Re: The joystick development thread

Post by MadMax1998 » 10 Nov 2015, 00:27

After messing around with logging and writing some conversion functions, I have successfully converted my two-way throttle into a one-way axis that only moves the ship forward, never backward. This may be exactly what you guys are looking for.

I'm thinking that if one of your joysticks were to have a true one-way axis, it might show up as "RighrTriggerAxis" or "LeftTriggerAxis", because on a controller the triggers are one-way axes and if a stick abides by the XInput standard, its one-way axes should register as triggers while the two-way axes should register as "LeftX" etc. If you can confirm that this is the case, I may be able to have our game intelligently decide how to handle each axis type just by looking at the incoming input when you try to bind an axis.

As soon as you guys can give me some feedback in this thread, I'll get a small build ready so we can test this.
Max
Sol Contingency Programming Lead
Sol Contingency Website

MaxT
Beta Tester
Posts: 26
Joined: 18 May 2013, 20:47

Re: The joystick development thread

Post by MaxT » 10 Nov 2015, 00:53

Stick: http://www.thrustmaster.com/products/t16000m
OS: Windows 10 Pro
Driver: Thrustmaster 1.FFD.2015
TARGET software is not installed

See attachment for the device testing.

The RZ Axis is the twist.
The Slider0 is the throttle.

When the throttle and the twist are in the middle, both show up at 50% as you see in the screenshot. When the slider is moved all the way to the bottom, the bar is all white. When the slider is moved all the way up the bar is all green. Pretty much like what you have described with your EVO.

- In the game, as soon as I click to bind any of the joystick axis, RightX shows up.
- Moving the throttle all the way up, all the way down, or keeping it in the middle, still produces RightX as soon as soon as I click to bind any axis.
- I can override RightX from binding right away if I am holding the stick in a different direction. For example, if I push the stick forward I can bind LeftY as my pitch, if I push the stick to the left I can bind LeftX as my yaw.
- However, the RZ axis (twist) will not bind at all, no matter what I do.
Attachments
t16000cp.jpg

STealTH
Beta Tester
Posts: 66
Joined: 14 Dec 2013, 16:50
Location: New Zealand

Re: The joystick development thread

Post by STealTH » 10 Nov 2015, 05:18

Stick: http://support.logitech.com/en_us/produ ... eme-3d-pro
OS: Windows 8.1
Driver: 5.9.129.0

Z axis is twist.
Slider is throttle.

-- The slider (throttle) has a max value of 255, starting from zero %. When at 128, it's exactly half way. When the throttle is all the way down it shows a value of 255, and when all the way up it shows a value of zero.
-- The Z rotation (twist) hax a max value of 255, starting from zero %. When at 128, it's exactly half way. Sounds like a one-way axis because it starts at zero. Full twist Right value = zero. Full twist left value = 255.

-- In the game when, as soon as I click bind any of the joystick axis, RightX shows up.
-- Moving the throttle all the way up, all the way down, or keeping it in the middle, still produces RightX as soon as soon as I click to bind any axis.
-- I can override RightX from binding right away if I am holding the stick in a different direction. For example, if I push the stick forward I can bind LeftY as my pitch, if I push the stick to the left I can bind LeftX as my yaw.
-- However, the Z axis (twist) will not bind at all, no matter what I do.

-- As we can see, I have the exact same situation in game as MaxT.

User avatar
MadMax1998
Site Admin
Posts: 1555
Joined: 07 Nov 2012, 13:43
Location: Berlin, Germany
Contact:

Re: The joystick development thread

Post by MadMax1998 » 10 Nov 2015, 14:19

Thanks guys.
However, the Z axis (twist) will not bind at all, no matter what I do.
I believe this happens because the order of axes is important, and your Z axis is overridden by the throttle axis which immediately registers as RightX. Your main stick axes are further up the order than the throttle, so the engine binds those properly, but the twist may be below the throttle in order, so it does not get registered.

This is a weird bug for sure. The Logitech stick does seem to have one-way axes with the values going from 0 to 255, but remember that my stick shows two bars (like MaxT's TM calibration panel) and they also go to zero when I twist the stick to the left or lower the throttle, and yet these are both two-way axes. The bars or numbers in the control panel may make these axes look like one-way but they may not be (in fact, for a twist axis it would be highly unusual to be one-way).

The only surefire way to find out what your sticks are actually doing is by logging their inputs from our game. I have already coded up the console commands, just need to package a build (without content to make it smaller) and get it to you guys.
Max
Sol Contingency Programming Lead
Sol Contingency Website

MaxT
Beta Tester
Posts: 26
Joined: 18 May 2013, 20:47

Re: The joystick development thread

Post by MaxT » 10 Nov 2015, 14:37

Great. I'll be able to test later tonight when I get home.

Just a thought, and I am by no means an expert at this, but I have seen games that bind joystick axes based on change in input. So the stick can be sending RightX at whatever value, however, it is ignored until it changes. So if I clicked on binding the Y axis or the X axis, it wouldn't care that the RightX is being sent. It would take whatever axis changes it's value next. (ignore if this is a stupid idea) :p

User avatar
MadMax1998
Site Admin
Posts: 1555
Joined: 07 Nov 2012, 13:43
Location: Berlin, Germany
Contact:

Re: The joystick development thread

Post by MadMax1998 » 10 Nov 2015, 16:23

No, that's actually a great idea. Just have to figure out how to code it.
Max
Sol Contingency Programming Lead
Sol Contingency Website

MaxT
Beta Tester
Posts: 26
Joined: 18 May 2013, 20:47

Re: The joystick development thread

Post by MaxT » 11 Nov 2015, 01:22

Results from testing the special build:

- LogRightX - console gets spammed with -1.0000 over and over. Moving the slider (throttle) does not change the values. Moving other axes does not change the value either.
- LogRightY - console gets spammed with -1.0000 over and over. Moving the Z axis (twist) does not change the values. Moving other axes does not change the value either.
- The rest of the axes work as expected.

Bonus Points:

- LogJoyX and LogJoyY work as expected ranging from -1.0000 to 1.0000 with 0.0000 being idle.
- LogJoyZ does not respond to twisting the stick. Console keeps spamming 0.0000 and does not change.
- F,S, and U are not applicable in my case. I use buttons/hat switch, so they are not mapped to axes.

- While LogJoyZ is active, when I use ToggleOneWayRoll the value changes from 0.0000 to 0.2857 (continuously spammed over and over) and does not respond to twisting the stick (the ship however, starts a slow roll in one direction).
- ToggleNegOneWayRoll has no changes on the value. LogJoyZ stays at 0.0000

STealTH
Beta Tester
Posts: 66
Joined: 14 Dec 2013, 16:50
Location: New Zealand

Re: The joystick development thread

Post by STealTH » 11 Nov 2015, 06:15

Testing in special build with the Logitech Extreme 3D Pro

Result of keying in "logleftx" while ship automatically turns:
1. All readings without touching the stick (at middle) show 0.0000.
2. Moving the throttle makes no difference, all continues as 0.0000.
3. Moving the stick to the top left corner changes readings to -1.0000.
4. Moving the stick to the bottom left corner changes readings to -1.0000.
5. Moving the stick to the top right corner changes readings to 1.0000.
6. Moving the stick to the bottom right corner changes readings to 1.0000.
7. Twisting the stick to the right (clockwise) does not change readings, stays at 0,0000.
8. Twisting the stick to the left (anti-clockwise) does not change readings, stays at 0,0000.
9. Movement is responsive of stick but ship still automatically turns.
10. The readings on this axis seem consistent for left and right.

Result of keying in "loglefty" while ship automatically turns:
1. All readings without touching the stick (at middle) show 0.0000.
2. Moving the throttle makes no difference, all continues as 0.0000.
3. Moving the stick to the top left corner changes readings to -1.0000.
4. Moving the stick to the bottom left corner changes readings to 1.0000.
5. Moving the stick to the top right corner changes readings to -1.0000.
6. Moving the stick to the bottom right corner changes readings to 1.0000.
7. Twisting the stick to the right (clockwise) does not change readings, stays at 0,0000.
8. Twisting the stick to the left (anti-clockwise) does not change readings, stays at 0,0000.
9. Movement is responsive of stick but ship still automatically turns.
10. The readings on this axis seem inconsistant as 'up and down' in 'options' is inverted.

Result of keying in "logrightx" while ship automatically turns:
1. All readings without touching the stick (at middle) show -1.0000.
2. Moving the throttle makes no difference, all continues as -1.0000.
3. Moving the stick to the top left corner does not change readings, it stays at -1.0000.
4. Moving the stick to the bottom left corner does not change readings, it stays at -1.0000.
5. Moving the stick to the top right corner does not change readings, it stays at -1.0000.
6. Moving the stick to the bottom right corner does not change readings, it stays at -1.0000.
7. Twisting the stick to the right (clockwise) does not change readings, it stays at -1,0000.
8. Twisting the stick to the left (anti-clockwise) does not change readings, it stays at -1,0000.
9. Movement is responsive of stick but ship still automatically turns.
10. This confirms that RightX is the culprit, again. Don't know if it's the throttle.

Result of keying in "logrighty" while ship automatically turns:
1. All readings without touching the stick (at middle) show 0.0000.
2. Moving the throttle makes no difference, all continues as 0.0000.
3. Moving the stick to the top left corner does not change readings, it stays at 0.0000.
4. Moving the stick to the bottom left corner does not change readings, it stays at 0.0000.
5. Moving the stick to the top right corner does not change readings, it stays at 0.0000.
6. Moving the stick to the bottom right corner does not change readings, it stays at 0.0000.
7. Twisting the stick to the right (clockwise) changes readings to 1,0000.
8. Twisting the stick to the left (anti-clockwise) changes readings to -1,0000.
9. Movement is responsive of stick but ship still automatically turns.
10. This joystick uses RightY as the Twist function and has a Two-Way axis.

Result of keying in "loglefttrigger" while ship automatically turns:
1. Moving in every direction, using throttle or twist has no effect, no readings show up.

Result of keying in "logrighttrigger" while ship automatically turns:
1. Moving in every direction, using throttle or twist has no effect, no readings show up.


I have keyed in ToggtleOneWay and ToggleNegOneWay to test the throttle, 'Command not recognized' for both.

I have gone back to the options menu and RightX keeps auto selecting. Bonus points are not possible as RightX is locked at -1,0000 and does not recognize any input from the joystick.

After all this I have gone back to Windows settings and tested the throttle, which works appropriately. The ship does stop turning and LogRightX stops giving readings, however, only when alt-tabbed.


I hope this helps,

STealTH

User avatar
MadMax1998
Site Admin
Posts: 1555
Joined: 07 Nov 2012, 13:43
Location: Berlin, Germany
Contact:

Re: The joystick development thread

Post by MadMax1998 » 11 Nov 2015, 15:03

So to recap:

The Thrustmaster stick has both a nonfunctional throttle and twist.
The Logitech stick has a nonfunctional throttle but the twist works (two-way).

This is unexpected, especially considering that the axes which are nonfunctional don't send 0 but -1 instead. I can only assume it's related to your joystick driver or companion software. Do you have other Unreal engine games that you could test your stick with? I'd like to know if the engine has a general problem with your sticks or whether it's just our game.

EDIT: I've read that the TARGET software that's for the TM joystick can be used to create a virtual controller that combines all of your connected TM joysticks. Maybe the software sends the virtual controller's inputs to the engine instead of the joystick data directly. And maybe that controller misses the inputs from the two axes that are nonfunctional.
Max
Sol Contingency Programming Lead
Sol Contingency Website

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest