Page 1 of 1

Using an XBOX 360 controller - Input now on SDL2

PostPosted: 01 Dec 2012, 20:13
by murderon
Hey there

First off, cool game. I've always loved spline-based track editors, so it's cool to see it attached to a game with some nice car physics and handling.

My issue is that I can't assign the axises of the XBOX 360 controller to the controls. In the bottom right corner of the input screen it shows which axises are being moved and the intensity, so it's definitely detecting the trigger buttons and the joysticks. I click on the button and try to map it to a trigger or a joystick and nothing happens, though. I checked the Wiki a bit and I still couldn't figure this out. What am I missing?

Any help on this matter would be appreciated :)

Re: Using an XBOX 360 controller

PostPosted: 01 Dec 2012, 20:48
by CryHam
Hmm, looks like a bug. I can't tell much, there were many issues with input. If those are detected than something is faulty in our code to bind them.
We have planned using an other input library, maybe it will help, not sure though. I don't have a controller, only a steering wheel that works. Would have to debug the code that binds.

Re: Using an XBOX 360 controller

PostPosted: 01 Dec 2012, 21:12
by murderon
Alright then. Thanks for the speedy reply and good luck with the game.

Re: Using an XBOX 360 controller

PostPosted: 07 May 2013, 07:38
by wowie
I recently purchased an Xbox360 controller for use with my PC, and decided to give it a spin with this game after downloading 2.0 ...As stated above, it doesn't work. I'll give a bit more detail: buttons work, but analog inputs will not be accepted. The triggers are analog inputs, and for some reason the D-pad is also detected as an analog input. After some research I discovered ( http://en.wikipedia.org/wiki/DirectInput ) that even if the buttons did all work, it would be useless because both of the triggers are assigned to the same axis.

Note that half of the gibberish I'm spouting here is probably wrong because I don't even know what half of this stuff means, but someone with more tech know-how than myself could probably figure it out. Until then, I'm just going to wait until the big control rewrite ( https://code.google.com/p/vdrift-ogre/i ... ail?id=188 ) before I attempt to use my controller with this game again.

Re: Using an XBOX 360 controller

PostPosted: 27 May 2013, 03:02
by Sneer
Yep, no axis bindings (detection is working). Interesting game though!

Re: Using an XBOX 360 controller

PostPosted: 31 May 2013, 19:45
by Sneer
I've added the xbox controller manually. It's working for 1 direction only (left or right - both does not work here).

<action name="Steering" type="AnalogAxis" UseAbsoluteValues="0" MinValue="-1" MaxValue="1" Sensitivity="1" InverseMul="1" AnalogEmulator="Linear" DecSpeed="5" IncSpeed="5" ReturnEnabled="1" ReturnValue="1" ReturnDecSpeed="5" ReturnIncSpeed="5">
<binding>
<bind role="inc">Controller (XBOX 360 For Windows)_0/Axis 1</bind>
<bind role="dec">Controller (XBOX 360 For Windows)_0/Axis 1</bind>
</binding>

Re: Using an XBOX 360 controller

PostPosted: 08 Jun 2013, 14:26
by CryHam
Ok I'm starting with changing input to SDL.
There is a branch 'sdl_joy', anyone on Linux with a joystick/wheel/controller, and with ability to build from sources please test if it works
https://github.com/stuntrally/stuntrally/tree/sdl_joy

Re: Using an XBOX 360 controller

PostPosted: 29 Jul 2013, 07:38
by CryHam
We have now code on master with rewritten input implementation using SDL2.
Should be free of the input problems.
Testing welcome.

Re: Using an XBOX 360 controller - Input now on SDL2

PostPosted: 07 Aug 2013, 13:13
by CryHam
So okay, it is not possible now to bind 1 axis to both throttle and brake.

Re: Using an XBOX 360 controller - Input now on SDL2

PostPosted: 11 Aug 2013, 13:16
by CryHam
Just implemented. Now it IS possible, on master. Testing welcome.
As the tooltip of the new checkbox "one axis for throttle and brake" on Input Player tab says:
If your controller has throttle and brake in one axis, check this. Bind axis to throttle, unbind brake. Use Inverse from throttle if needed.

Re: Using an XBOX 360 controller - Input now on SDL2

PostPosted: 15 Aug 2013, 03:34
by Wuzzy
I tested it and it works like a charm. :)

Re: Using an XBOX 360 controller - Input now on SDL2

PostPosted: 15 Aug 2013, 08:41
by CryHam
Cool.