Jump to content
  • 0

Joystick not working after proper setup


DarthXavius
 Share

Question

Hey all,

So I have a logitech G940 HOTAS I have been trying to set up for days now, google searches and forum searches have revealed no answers. When I launch KSP and go into settings, I can assign pitch and roll to my G940 and click accept. I checked the settings.cfg and it saved properly:

Quote

AXIS_PITCH
{
    PRIMARY
    {
        name = Joystick 0
        axis = 1
        inv = False
        sensitivity = 1
        deadzone = 0.0490917228
        scale = 1
        group = 0
        modeMask = -1
    }

 But I also have this entry in the settings.cfg file:

Quote

INPUT_DEVICES
{
     = 0
}

What should be shown under input devices? I can bind the joystick properly in the settings but in game the joystick does nothing according to the pitch/roll/yaw indicators on the HUD.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

Please ensure the stick is plugged in before starting KSP, as KSP needs the enumerated list of controller names that the Unity engine makes when it is started.

If the controller does not have a hardware name that Unity can find using Input.GetJoystickNames() then KSP won't be able to use it, sorry :/

Link to comment
Share on other sites

  • 1

INPUT_DEVICES holds the name of all recognized devices (Unity can work with up to 4 joystick devices). The format is just that, on each line goes a <device_name> = <device_ID> (<device_ID> = 0, 1, 2, 3). Connecting/disconnecting devices (or any OS quirk with devices) while KSP is running can bring to assigning a <device_ID> to a unrecognized device. Please note that <device_name> also shows with all the AXIS_... sections further down (line "name = <device_name>"), if those were set, so you may find the correct name in there.

Hope it works for you just editing the correct name in that line, as I can't verify if that would work here.

Link to comment
Share on other sites

  • 1

May you try writing, in that line where " = 0 " is, "Logitech G940 = 0" (or whatever your stick name is recognized as)? The correct syntax there is "<device_name> = <device_ID>" and from your post above seems you did everything but using that.

Link to comment
Share on other sites

  • 1

Unfortunately I have a different device, so can't guess what name you should use. However here is the settings.cfg from my KSP 1.2.2 game install. To notice, I have one stick, but some other input device: KSP got confused time ago and that is probably  the reason I have two listed as joysticks. I keep a number of other KSP installs (testing purposes) and all works with just my "true" stick listed; or even with my true stick plus a non-valid line in INPUT_DEVICES like "  = 1".

You may note each and every of the programmed axes has the same name as my "true" stick. This isn't true with stick buttons, those still go with Joystick#Button# syntax (you'll not find many in my cfg as I program those with the stick control software, Unity/KSP is too limited to allow full programming of those).

Didn't ask what OS you use. In case you are on Windows, you can check how the OS recognizes the stick by opening DXdiag.exe, in the "Input" tab it shows device_name, device_ID and some other info. Those match with the settings.cfg entries on my system, believe should on yours too.

Link to comment
Share on other sites

  • 0

Diomedea,

Yeah, I included the settings.cfg info because I have tried changing the "name = Joystick 0" line to 0, tried changing the Input device "= 0" to "Joystick 0", and then I've played around with a bunch of different variations thereof. Just tried again changing "name = Joystick 0" to "name = 0" to no effect.

Edited by DarthXavius
Link to comment
Share on other sites

  • 0
10 hours ago, diomedea said:

May you try writing, in that line where " = 0 " is, "Logitech G940 = 0" (or whatever your stick name is recognized as)? The correct syntax there is "<device_name> = <device_ID>" and from your post above seems you did everything but using that.

Yeah, just tried putting everything I can think of in there as well, from Joystick1, which when I assign a button on my joystick to a control it will say something like "Joystick1Button3", to Logitech G940, to Joystick 0, which is the name in the axis settings, to Logitech G940 Joystick which is what xpadder sees... No joy on anything, when I exit and boot up kerbal again and go back into settings my axis bindings are no longer saved. If I delete the "= 0" line under input devices in settings.cfg, it saves the axis information properly on rebooting but then when I go into a vessel on the runway, my pitch and roll inputs are jittering all over the place and don't correspond to the correct input movements from the joystick. Thanks diomedea for helping me out, I have no idea whats going on... If anyone else reads this and uses a joystick or controller input, would you mind posting your INPUT DEVICES and AXIS _PITCH entries from settings.cgf so I can see what it looks like for someone who got it working?

Link to comment
Share on other sites

  • 0

So the work around I found is to install Advanced Fly by Wire Mod, and look on the forum for that mod and someone has posted an updated .dll that works in 1.2.x. Then you need to install Blizzy's toolbar, and set it up in there. Works for me now. Unfortunate that Unity can't find the controller, which is what I narrowed the problem to. Thanks diomedea for all your help.

Edited by DarthXavius
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...