Hi all
My application is reading my input hardware left stick x, y inputs (xbox one elite) via xinput. The input values are in the range of [-1.0f, 1.0f]. It converts them by multiplying 32767 to comply to the gimx values and sends them to gimx via network as described by http://gimx.fr/wiki/index.php?title=Net ... end_report
If I try to press my input hardware stick straight to the right, left, up or down on console it results in diagonal movement.
What are possible reasons for that issue?
Note: If I click on gimx launcher -> file -> edit it says "cannot open conf file: ip:port". I thought this is ok since I want gimx to interpret the values as they are. Is that why minimal axis values cause diagonal movement?
Sending axis values via UDP don't work as expected (straight axis movement not possible)
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Please post a log file as requested in forum rules: viewtopic.php?f=5&t=691
Make sure to reproduce the issue while generating the log file.
Make sure to reproduce the issue while generating the log file.
GIMX creator
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
My bad for not following the rules Matlo, I'm sorry.
Cronus device
PS4 pro
Its not game relevant I guess but e.g. fifa 20
Full log file:
https://pastebin.com/kPCta28D
Interesting parts in my view:
As you can see I'm trying to walk straight right but the little y values seem to cause diagonal movement. Of course I could add a treshhold and set the y values 0 in my app but I'm guessing from a native controller these values wouldn't cause diagonal movement do they?
Cronus device
PS4 pro
Its not game relevant I guess but e.g. fifa 20
Full log file:
https://pastebin.com/kPCta28D
Interesting parts in my view:
Code: Select all
0 1576347777.335010, lstick x (32765), lstick y (282)
0 1576347777.347642, lstick x (32766), lstick y (185)
0 1576347777.360153, lstick x (32766), lstick y (39)
0 1576347777.372750, lstick x (32766), lstick y (39)
0 1576347777.385533, lstick x (32766), lstick y (-95)
0 1576347777.397202, lstick x (32766), lstick y (-192)
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Will there be any support for this issue please?
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
GIMX forwards what the client sends.
The issue is due to the joystick and/or your code. In both cases the only way to fix it is to tweak your code to add a dead zone, or a non-linear sensitivity.
Did you try using GIMX as a client? Does it show the same issue?
The issue is due to the joystick and/or your code. In both cases the only way to fix it is to tweak your code to add a dead zone, or a non-linear sensitivity.
Did you try using GIMX as a client? Does it show the same issue?
GIMX creator
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Hi Matlo, thx for answering I greatly appreciate your time.
Gimx is working fine. It was naive to think I could just pass the xinput values to the gimx and the game will behave like manual input. My thought was: if I use a similar joystick as the ds4 sending the values from the axis as I read them would be the same as pushing the analog stick with my thumb.
As you can see I don't have much knowledge about this. Since you are experienced I'm sure you know what knowledge is missing here. Are there any links in your mind or tips how I should proceed? I quickly added something like a "deadzone" and straight movements are now possible. Thanks! I now have a problem when I'm trying to do slight diagonal movements they look like stairs
Gimx is working fine. It was naive to think I could just pass the xinput values to the gimx and the game will behave like manual input. My thought was: if I use a similar joystick as the ds4 sending the values from the axis as I read them would be the same as pushing the analog stick with my thumb.
As you can see I don't have much knowledge about this. Since you are experienced I'm sure you know what knowledge is missing here. Are there any links in your mind or tips how I should proceed? I quickly added something like a "deadzone" and straight movements are now possible. Thanks! I now have a problem when I'm trying to do slight diagonal movements they look like stairs
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Something to check is if xinput provides raw or modified events.
List xinput devices using:
Then show xinput events using:
(replace "device name" with the name of your joystick)
Install evtest and jstest:
List event devices using:
Then show joystick events using:
(replace X with whatever your joystick device number is)
Then have a look at xinput and joystick events simultaneously. Check if they are the same or not. If they are not the same, don't use xinput.
List xinput devices using:
Code: Select all
xinput --list
Code: Select all
xinput test "device name"
Install evtest and jstest:
Code: Select all
sudo apt install evtest joystick
Code: Select all
evtest
Code: Select all
jstest /dev/input/eventX
Then have a look at xinput and joystick events simultaneously. Check if they are the same or not. If they are not the same, don't use xinput.
GIMX creator
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Thank you very much matlo.
I have been reading the source code for the past 2 days with my very little C knowledge and I'm amazed by your work! Really appreciate all the effort you put into this. Also I wanted to start the donations for 2020 with a little contribution
For now all my questions are gone and I have a plan to continue my work. See you soon in the forums
I have been reading the source code for the past 2 days with my very little C knowledge and I'm amazed by your work! Really appreciate all the effort you put into this. Also I wanted to start the donations for 2020 with a little contribution
For now all my questions are gone and I have a plan to continue my work. See you soon in the forums
Re: Sending axis values via UDP don't work as expected (straight axis movement not possible)
Thanks for the donation
GIMX creator