Trouble with input manager with Joysticks (logitech g27)

Hello everyone!

I am using the logitec G27 set (steering wheel,pedals and gear).
I am able to get input from steering wheel and 2 pedals, and can not get input from the gear joystick.

I tried all axes with all combination of joystick numbers.
Has anyone used or tried this? Its making me sick:@
please check the attached image

2 Answers

2

It’s likely that the gear lever isn’t an axis, but a two or more buttons (depending on it being a vertical or gated shifter). So, check for button presses, not axis changes.

@iwaldrop thanks for the reply, so for the input type, there's 4 possible types. so if its not the "Joystick Axis" then it must be "key or mouse button".. I did put key or mouse button, and couldn't read any input with Input.GetButton("gear")); and Input.GetButtonDown("gear")); ... it seems soo strange .. but I think the type has to be Joystick Axis

For things like this you must brute-force your way into finding what the buttons are. Create a bit of code that listens to every single possible joystick input and watch the activity when you use the gear switch.

I agree with Loius' comment, and it is something I've done myself. You'd be surprised how useful something like that can be, because you can use it again on a new project or when you're trying to support a new input device.

@iwaldrop , @Loius thank you for your help. Can you give me some hint of how to listen to every possible joystick. I tried using Input.GetJoystickNames() and the only thing I got is Input.GetJoystickNames()[0] which returns "G27 Racing Wheel".. Man I'm stuck in this!

@Loius man I just don't get what's going on! please check the attached picture, as you see I have only one input returning -1 , and the rest returning 0 which means no input. put as I shift gears/press all buttons on gear and -1 remains -1. Have you ever used this joystick set? W[9879-joy.jpg|9879]W

Well after 2 days I did solve this issue, it was simple but still I couldn’t find any direct answer.

The wheel and the pedals are considered as axis , but the gears as buttons .
iwaldrop was right.(but how to get input from those buttons).

to get input from the gears, I had to put “joystick number 8”, “joystick number 9” …
in the field “Positive button”, and get the input by:

Input.GetButton("1stGear"));

while getting input from the wheel was like :

Input.GetAxis("Horizontal"));

to check what joystick number I simply tested all one by one.

check the attached picture.

and get the input, for example:

Yep. Sounds about right...

hi, @moghes I am working on something like you did but I have a problem with the brake pedal and the reverse gear. I hope you help me and tell me how can I do it. Waiting for your answer. Thanks

hi, @moghes I am working on something like you did but I have a problem with the brake pedal and the reverse gear. I hope you help me and tell me how can I do it. Waiting for your answer. Thanks

Can i ask you a couple of questions, did you have to add any files to your project for this to work (like xinput for example) , when you move in to first gear is it pressed one time or is it pressed all the time, and is neutral gear also recognized.