Jump to content

Looks like no joystick support yet?


Elfmaze

Recommended Posts

43 minutes ago, JoeSchmuckatelli said:

I was just coming here to ask if anyone had gotten a HOTAS setup to work.

Guess I'll be waiting a while.

 

But yeah - HOTAS / stick of some kind is a feature I'd really like to see!

I have, sort of, but it's dependent on software that converts the axis inputs for yaw and throttle to keystrokes. My specific solution is for CH Products controllers only but the general idea will work with other utilities. More details here.

Link to comment
Share on other sites

i blame ms for this one. their modern joystick apis are trash. unless you want to just use a gamepad. we used to have direct input, which i believe died with directx 8.  then ms wanted to xboxify the pc and introduce the grossly inferior xinput. of course then they decided to redux flight simulator and include hotas support, and so introduced rawinput for very low level calls, this api is very difficult to use. actually all this stuff should be covered by unity. 

Edited by Nuke
Link to comment
Share on other sites

i have confirmed gamepad support. its sad because this game benefits from more robust controls of a hotas. i dont have a gamepad but my analog keyboard can emulate one.

hotas might work if it supports an xinput mode. otherwise you could use an xinput wrapper. something like ucr should work.

Edited by Nuke
Link to comment
Share on other sites

On 2/25/2023 at 3:56 AM, Nuke said:

i blame ms for this one. their modern joystick apis are trash. unless you want to just use a gamepad. we used to have direct input, which i believe died with directx 8.  then ms wanted to xboxify the pc and introduce the grossly inferior xinput. of course then they decided to redux flight simulator and include hotas support, and so introduced rawinput for very low level calls, this api is very difficult to use. actually all this stuff should be covered by unity. 

Actually it's covered by SDL, which Unity uses for input/output control I believe.

Link to comment
Share on other sites

1 hour ago, Mutex said:

Actually it's covered by SDL, which Unity uses for input/output control I believe.

sdl is pretty good, ive used it, granted only version 1.2. 

also i retract what i said, dispite being able to bind the controls, they did nothing in game. i believe this might be a stub feature. 

Link to comment
Share on other sites

  • KSP2 Alumni

This was originally intended to be included during the early access launch, but was disabled due to stability issues. It'll be re-enabled once those get ironed out.

Link to comment
Share on other sites

  • 4 months later...
On 2/25/2023 at 2:30 AM, JoeSchmuckatelli said:

I was just coming here to ask if anyone had gotten a HOTAS setup to work.

Guess I'll be waiting a while.

 

But yeah - HOTAS / stick of some kind is a feature I'd really like to see!

I had pitch and roll working with a thrustmaster t16000 from release (I set yaw and throttle to a hat switch), but patch 3 broke it. You could try v0.1.2 if you must have (some) joystick control, or just do what I did and go back to KSP1.

If you do try 0.1.2, there are a couple of minor bugs (at least for me). Once you have your joystick set up, you might need to go into the key bindings menu every time you restart the game. You don't need to change anything, just a quick open and close of the menu. The joystick won't initialise if you don't. Secondly, when I loaded a saved game,  SAS would work back to front until I manually moved the joystick. Again, this is only after you first start the game, not after every load.

Also, if you change the map toggle to a joystick switch, it only applies it to opening the map, you still need to press "M" to close the map.

 

On 3/1/2023 at 6:18 PM, Dakota said:

This was originally intended to be included during the early access launch, but was disabled due to stability issues. It'll be re-enabled once those get ironed out.

You said the same in my bug report, but my experience says otherwise. You might have intended to disable it, but didn't (at least not completely). Not until patch 3 anyway. You did get my hopes up with patch 3 though, because, unlike in previous versions, it would at least register yaw and throttle in the key binding menu.

Edited by Turbo Ben
Link to comment
Share on other sites

  • 2 months later...

I have a good news, I manage to setup the Joystick!

Steps to configure it:

  1. Go to the settings and setup the pitch, yaw, roll for your Joystick
  2. Save your settings
  3. Navigate to c:\Users\<Username>\AppData\LocalLow\Intercept Games\Kerbal Space Program 2\Global\
  4. Edit InputBindings.json
  5. Find every processors and add clamp(min=-1,max=0)  and clamp(min=0,max=1) for each axes. Make sure you add the highlighted text between \"
  6. Save the file
  7. Load the game
  8. Navigate to the Settings and click on Input
  9. Do not modify any settings, otherwise the InputBindings.json will be overwritten and you have to start from 5.
  10. Load you campaign and enjoy the flight

Background info:

The reason it was not working, because when you configure your Joystick axes for the flight they add your axis two times (eg.: pitch up, pitch down like W, S). You can test it if you remove one of your Flight/Pitch the path value. Let's say we keep the Flight/Pitch up binding. If you load the game the same way as I described you will notice that no matter that you move your Joystick forward or backward the pitch will always go up. Joystick axes value  moves in range -1 ... 1, but KSP2 internally transform this to absolute value. That's why no matter if you move it to -1 or 1 the end result will be always 1 and the pitch goes up. To solve the issue you can add clamp. This will remove the lower and upper part of your Joystick value range and it will not let the bindings go down in Pitch Up binding and up in Pitch Down binding. I hope it makes sense for you.

KSP 2 uses the Input System package for Unity to handle input: https://docs.unity3d.com/Packages/[email protected]/manual/Processors.html#clamp

Example:

"{\"bindings\":[{\"action\":\"Flight/Pitch\",\"id\":\"27397e14-6a24-4bbf-8830-e3cc4ad3db69\",\"path\":\"<Joystick>/stick/y\",\"interactions\":\"\",\"processors\":\"clamp(min=0,max=1)\"},{\"action\":\"Flight/Pitch\",\"id\":\"1eff4572-25e9-4520-bd55-07a5f4415db3\",\"path\":\"<Joystick>/stick/y\",\"interactions\":\"\",\"processors\":\"clamp(min=-1,max=0)\"},{\"action\":\"Flight/Roll\",\"id\":\"d273a7bf-6efa-4915-acaa-dab56c2719a8\",\"path\":\"<Joystick>/stick/x\",\"interactions\":\"\",\"processors\":\"clamp(min=-1,max=0)\"},{\"action\":\"Flight/Roll\",\"id\":\"3627ecee-69c2-45ca-8f78-c0dad13257ef\",\"path\":\"<Joystick>/stick/x\",\"interactions\":\"\",\"processors\":\"clamp(min=0,max=1)\"},{\"action\":\"Flight/Yaw\",\"id\":\"fe5396d2-4c1d-4bf9-915b-1bdfd3d5cc39\",\"path\":\"<HID::Thrustmaster T.16000M>/rz\",\"interactions\":\"\",\"processors\":\"clamp(min=-1,max=0)\"},{\"action\":\"Flight/Yaw\",\"id\":\"ce110cb9-c1f9-43cd-a91a-0a02bfdae364\",\"path\":\"<HID::Thrustmaster T.16000M>/rz\",\"interactions\":\"\",\"processors\":\"clamp(min=0,max=1)\"}]}"

I wish you the best!

Edited by DancZer
Link to comment
Share on other sites

  • 5 months later...
On 3/1/2023 at 11:18 AM, Dakota said:

This was originally intended to be included during the early access launch, but was disabled due to stability issues. It'll be re-enabled once those get ironed out.

@Dakota, any updates on where this falls on the priority queue? I know it's death to project out any firm dates to fans, LOL. Just wanted to ask if it's "near-ish, mid, far, or very far". This is the biggest reason I put KSP2 down and don't plan on getting back into it.

Link to comment
Share on other sites

On 2/24/2023 at 5:25 PM, Voculus said:

I knew the game was in early access, but the lack of support for anything that's not a keyboard is a very disappointing. ;.;

To me, it's disappointing as unity has an input API that supports it...

https://docs.unity3d.com/Packages/[email protected]/manual/Joystick.html

I understand that the developers wanna focus on making the new updates, however it worries me that joystick support isn't a thing. When the engine clearly supports it

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
Reply to this topic...

×   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.

×
×
  • Create New...