Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR controller - cannot push/pull autopilot knobs #6607

Open
dataslug1 opened this issue Jan 27, 2022 · 38 comments
Open

VR controller - cannot push/pull autopilot knobs #6607

dataslug1 opened this issue Jan 27, 2022 · 38 comments
Labels
Bug Something isn't working Good First Issue Good for newcomers

Comments

@dataslug1
Copy link

Aircraft Version

Experimental

Build info

{
  "built": "2022-01-04T08:12:39+00:00",
  "ref": "experimental",
  "sha": "00c94c19d48c6d75b813cc5d8abd0d7b64c47b02",
  "actor": "aguther",
  "event_name": "manual"
}

Describe the bug

Cannot push/pull heading, altitude or speed knobs when flying with VR controllers

Expected behavior

The default Asobo A320 allows us to grab and push/pull these knobs by highlighting them, squeezing the trigger, and then pulling or pushing the controller forwards or backwards in the air. The FBW A320 does not seem to respond to these gestures.

Steps to reproduce

Any flight in A320

References (optional)

No response

Additional info (optional)

Using Quest 2 controllers, but I expect will be same for all VR controllers

Discord Username (optional)

No response

@dataslug1 dataslug1 added the Bug Something isn't working label Jan 27, 2022
@tracernz
Copy link
Member

If there are any devs out there that are into VR and able to help with VR related issues please do get in touch with us. Most of us don't do VR so we're not aware of VR issues, nor able to fix or test them.

@CORNU76
Copy link

CORNU76 commented Feb 26, 2022

je rencontre exactement le même problème avec l'A320nx, je ne suis pas en VR car je n'emploie pas de casque

@CBRadi0
Copy link

CBRadi0 commented Mar 6, 2022

Have you set your Cockpit interaction system setting to Legacy in the flight sim General Options > Accessibility menu?

@hzyoni
Copy link

hzyoni commented Mar 6, 2022

It doesn’t matter. It won’t push/pull.
This is soooo essential for Vr. I hope someone comes up with a fix

@chrisaut
Copy link

chrisaut commented Mar 13, 2022

You need to assign cockpit interaction secondary/tertiary action. Secondary pushes, tertiary pulls, I have push set to thumbstick click, and pull to the grip button.

If you also assign cockpit interaction increase/decrease to thumbstick X axis it's a breeze to turn knobs, eg. to change ALT, reach forward to highlight, thumb right, ok, push thumbstick to push knob, AP goes into CLB.

<Context ContextName="COCKPIT_INTERACTIONS">
    <Action ActionName="KEY_COCKPIT_INTERACTION_DECREASE" Flag="2">
	    <Primary>
		    <KEY Information="Thumbstick X">15</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_INCREASE" Flag="130">
	    <Primary>
		    <KEY Information="Thumbstick X">15</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_PRIMARY_VR_RIGHT" Flag="2">
	    <Primary>
		    <KEY Information="Trigger">24</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_SECONDARY" Flag="2">
	    <Primary>
		    <KEY Information="Thumbstick">13</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_TERTIARY" Flag="2">
	    <Primary>
		    <KEY Information="Squeeze">9</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_Y_AXIS" Flag="4">
	    <Primary>
		    <KEY Information="Thumbstick Y">16</KEY>
	    </Primary>
    </Action>
</Context>

Took me forever to find a this configuration, but now everything is nicely switchable, the only thing that seems a bit of a pain is the flyPad. It kind of works but its seems you have to click 3 or 4 times and wiggle around a bit to make it work.

@hzyoni
Copy link

hzyoni commented Mar 13, 2022

You need to assign cockpit interaction secondary/tertiary action. Secondary pushes, tertiary pulls, I have push set to thumbstick click, and pull to the grip button.

If you also assign cockpit interaction increase/decrease to thumbstick X axis it's a breeze to turn knobs, eg. to change ALT, reach forward to highlight, thumb right, ok, push thumbstick to push knob, AP goes into CLB.

<Context ContextName="COCKPIT_INTERACTIONS">
    <Action ActionName="KEY_COCKPIT_INTERACTION_DECREASE" Flag="2">
	    <Primary>
		    <KEY Information="Thumbstick X">15</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_INCREASE" Flag="130">
	    <Primary>
		    <KEY Information="Thumbstick X">15</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_PRIMARY_VR_RIGHT" Flag="2">
	    <Primary>
		    <KEY Information="Trigger">24</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_SECONDARY" Flag="2">
	    <Primary>
		    <KEY Information="Thumbstick">13</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_TERTIARY" Flag="2">
	    <Primary>
		    <KEY Information="Squeeze">9</KEY>
	    </Primary>
    </Action>
    <Action ActionName="KEY_COCKPIT_INTERACTION_Y_AXIS" Flag="4">
	    <Primary>
		    <KEY Information="Thumbstick Y">16</KEY>
	    </Primary>
    </Action>
</Context>

Took me forever to find a this configuration, but now everything is nicely switchable, the only thing that seems a bit of a pain is the flyPad. It kind of works but its seems you have to click 3 or 4 times and wiggle around a bit to make it work.

Thank you. By the way what do I do with the context you just wrote? Do I place it somewhere ?

Edit: I tried it and it didn't work. I heard it only works in the default asobo (clowns) a320

@chrisaut
Copy link

Hmm, it definitely works for me, I did 2 full flights in VR last night and it was for sure in the FBW (experimental).

Did you unassign the default actions from the buttons? I think maybe the FS window on the desktop needs to have focus, but I'm not sure. Maybe I can try to get a video later.

@hzyoni
Copy link

hzyoni commented Mar 13, 2022

I am at the develop version. I use it for my X and Y G2 controller . I did make sure that all other actions are cleared. Not sure if I FS window was focus or not. A video would be awesome! Thank you

@dataslug1
Copy link
Author

dataslug1 commented Mar 19, 2022

Took me forever to find a this configuration, but now everything is nicely switchable, the only thing that seems a bit of a pain is the flyPad. It kind of works but its seems you have to click 3 or 4 times and wiggle around a bit to make it work.

Hi, This didn't seem to work for me either - here's a screenshot of my controller config, could you please let me know if I am doing anything wrong? This is with Oculus Quest 2, latest experimental FBW like you. Many thanks!

image

@chrisaut
Copy link

Sorry the slow response. I recorded a quick video (note I didn't set up the flight just spawned in air so no nav/managed climb but it shows I can reliably push/pull the speed knob.

I'm not sure why it's not working for you.

Some additional info: I make sure the sim is running fullscreen, has focus. I'm running the Reverb G2 with the openXR beta runtime and the openXR toolkit, although I doubt these matter for how controllers behave.

In the G1000 planes I find that knob push interaction doesn't work unless you give the mouse a little push so the mouse cursor shows up, then press squeeze on the controllers (mouse cursor disappears) but then for some time pushing eg. the little FMS rotary/push thingy works. But for me the FBW doesn't seem to need this (although I've been flying more GA lately).

If you want me to show/try a specific scenario let me know, but I'm not sure how much it helps to show it's working for me.

Microsoft.Flight.Simulator.2022-03-26.14-37-51.mp4

@dataslug1
Copy link
Author

Sorry the slow response. I recorded a quick video (note I didn't set up the flight just spawned in air so no nav/managed climb but it shows I can reliably push/pull the speed knob.

I'm not sure why it's not working for you.

Thanks for replying. For some reason your video is not playing for me. I wondered, next time you are in the sim could you please confirm that your bindings look the same/similar to what I showed in my screenshot above, or are you binding something else?

Many thanks!

@chrisaut
Copy link

Hmm, yes doesn't seem to play on mobile, does on desktop for me though. Sorry about that not sure what is going on.

I'll get a screenshot for you later today or tomorrow when I'm back home, but you can see my config export above or in the video if you try on desktop.

@shameelx
Copy link

hi, can i get a guide on how to get the push pull to work properly in VR?
where can i enter that long code ?

@hzyoni
Copy link

hzyoni commented Mar 27, 2022

Hmm, yes doesn't seem to play on mobile, does on desktop for me though. Sorry about that not sure what is going on.

I'll get a screenshot for you later today or tomorrow when I'm back home, but you can see my config export above or in the video if you try on desktop.

Doesn't play on Desktop or mobile for me. really eager to know how you did it.

@chrisaut
Copy link

I'm sorry I don't know why it's not playing for you :( Maybe you can download it and play it locally? It should be 1:35 long
image

Here's a screenshot of my config. The important 2 are:
tertiary action: squeeze
secondary action: thumbstick
for pull/push respectively
image

@hzyoni
Copy link

hzyoni commented Mar 28, 2022

yup.... I don't know why it doesn't work for me (us). I consider you lucky thou.

@dataslug1
Copy link
Author

Hello all, I am pleased to say that it is working for me. I didn't make any changes to my config since my screenshot above (so the same setup as in @chrisaut screenshot) so I am not sure why it did not work for me last time - when I have more time I will try to reproduce.

So please all do follow @chrisaut binding suggestions as it does indeed work. I look forward to trying a full flight with it when I have time.

Many thanks @chrisaut for your help on this !

@shameelx
Copy link

hi all, can someone please tell me where the config file is located so that i can update it?

@dataslug1
Copy link
Author

I was also not able to find the config file, but doing it in the sim as per screenshot worked for me

@shameelx
Copy link

so the settings in the screenshot are letting me turn the knobs using the thumbstick. but i still cant push and pull knobs like the altitude selector.
is this working for others? what button is supposed to do that?

@chrisaut
Copy link

Obviously depends on how you configure it, but pushing the thumbstick on the right hand controllers should push the knob in (go to managed mode), and the squeeze button should pull.

The config files are in (for store version, I don't know about steam sorry)

%LOCALAPPDATA%\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\SystemAppData\wgs

inside weirdly named paths, for example mine is

0009000000FFC2F0_0000.....\9AA9C5E62B6241....

and the actual file is

4A9DF1ACB89......13A36D

with no extension, but they are just xml files

image

(I have replaced some alpha numericals with ... in all of the above as I'm not sure if these strings are user identifyable)

@shameelx
Copy link

so my secondary and tertiary are assigned just like yours but they do not push or pull the knobs.
using fbw experimental and reverb g2 controllers.

@chrisaut
Copy link

Did you remove other actions from the buttons? Are you running fullscreen? Did you try nudging the mouse just before you try to interact (and just to double check you assigned them to the (right/left) side controller that you are trying to use)? Are you trying with the direct interaction mode or the raycast mode (and ensured the controller you are trying to use is the active one)?

Otherwise can you show a video of what you are doing, maybe it's just a small misunderstand somewhere?

It seems pretty fiddly, but it does work reliably for me once it was setup.

@shameelx
Copy link

yeah i confirmed all the things you said. il try to get a video. the rest of the interactions are working so im using the correct controller. i tried the mouse thing and i do run msfs in full screen. the buttons arent assigned to anything else cause i cleared all other bindings

@dataslug1
Copy link
Author

dataslug1 commented Mar 28, 2022

Bizarrely, whilst it works with my left controller, I can#t seem to get it to work with my right, with the same bindings. I will keep trying and it could be an error on my side, but wanted to mention it in case it is a real bug and helps someone else.

@dataslug1
Copy link
Author

I have found the issue and now working on both left and right controllers. There seems to be a bug in the MSFS controller settings page, on my Quest2+SteamVR at least:

For the right controller, for some reason I need to select the "system" button instead of the expected "squeeze", and indeed this is what appears if I search for input and press the squeeze button. On the left controller it is labelled "squeeze" as expected. I think this is why it would not work for me initially, and I was probably initially taesting @chrisaut's suggestion using the right controller as well.

Here are screenshots of the working bindings:
Left
image

Right
image

@hzyoni
Copy link

hzyoni commented Mar 29, 2022

What do you mean by the “system” button? Slightly confused

@dataslug1
Copy link
Author

The squeeze button on the right controller is incorrectly labelled "system" (see my screenshot for right controller above). When I previously had it set to "squeeze" it did not work, but it works when set to "system".

@AndLindemann
Copy link

It would anyways be cool to get proper implementation for knob rotation via controllers into the plane. OpenXR toolkit is working on implementing hand tracking and is looking quite good in that regard, but as with hand tracking you can't use touchpad axis to rotate knobs, you'd need proper knob reaction to controller rotation axis.
It's working on the Asobo standard planes, but on the A32NX the knobs don't really rotate when rotating the controllers, it more looks like a completely random outcome when you're trying to do it.

Issue title should probably be renamed to something like "VR controller - several improvements needed" to get away from the autopilot specific focus, because I think that's not the only issue with controller support here.

@fjch1997
Copy link

I briefly tried to understand the code here. It appears that this project is using the pre-SU8 ASOBO_GT_Knob_Infinite_PushPull templates for push/pull knobs in src/behavior/src/A32NX_Interior_FCU.xml. The SDK documentation Creating Interactions Using InputEvents calls for using ASOBO_Interaction_Base_Template with ASOBO_Interaction_Push_Event_Base_Template and ASOBO_Interaction_Pull_Event_Base_Template, which should work in VR just like the default a320.
However, I have no knowledge in MSFS development. This is a huge project and I have no idea where to begin fixing it

@chrisaut
Copy link

Interesting, TBH I don't think I ever tried in the Asobo 320.

It sounds like this specific issue (turning knobs) then is due to the hard fork that occurred and those changes never got ported over after Asobo changes them in the default bus, if I understand your post correctly.

@fjch1997
Copy link

Knobs with push/pull like altitude and heading works in VR in the Asobo A320.
Interestingly, the Landing Lights 3-state switch doesn't work properly even in Asobo's A320
I am still quite confused about how this project is forking over the Asobo A320. Where is the original code for Asobo? How is it combined with this repo?

After some further digging, I found that there is a separate concept of KeyEvent and InputEvent. Seems that the latter is added after SU8 for Xbox and VR interactions, and is completely missing in this project.

@chrisaut
Copy link

I am still quite confused about how this project is forking over the Asobo A320. Where is the original code for Asobo? How is it combined with this repo?

I'm not a team member, but my understand is that originally it was just a mod that applied on top of the Asobo 320, then mod expanded to appear as a separate aircraft inside the sim, and sometime last year it was completely separated, my understanding is they took (with Asobo's blessing I guess) the existing aircraft at some point in time and have been working off of that (the hard fork). Anything Asobo might have done after that to the base A320 is not at all merged or combine automatically, it would have to be ported over manually. Including it appears these SU8 changes to input handling.

The code bases must have diverged so far by now that probably only surgical specific changes can be ported over. That template change sounds like it could be one such case.

@dataslug1
Copy link
Author

Knobs with push/pull like altitude and heading works in VR in the Asobo A320. Interestingly, the Landing Lights 3-state switch doesn't work properly even in Asobo's A320

Do you mean how you cannot "grab and pull" the 3+ way switches like you can with 2 way switches? This seems to be the same for all Asobo aircraft... It means different switches require different controller actions to use, which are not visually obvious. For example there are at least 3 different types in the TBM:

  1. 2 way switches activate as soon as you press trigger - For example TBM 2 way switches to the left of the Yoke such as de-ice
  2. 3+ way switches where they will move in a random direciton if you click them, and you must use the “increase cockpit interaction” binding to actually control them - For example TBM bleed air
  3. Switches and levers that do nothing on trigger, and require them to be grabbed/triggered and then dragged in the direction you wish to move them - example TBM Flaps, TBM throttle.

In my opinion Asobo should implement some consistency- In my opinion, all switches (2 way and 3+way) should be moveable with "grab and pull" (this is the method used in the excellent VTOL VR) and also with the increase cockpit interaction bindings (this works surprisingly nicely when bound to the thumbstick, especially with small switches). None should move by click alone.

@AndLindemann
Copy link

Still ALT/HDG/SPD autopilot knobs work differently for me in stock Asobo A320 and A32NX.
Using Raycast controller mode, I can grab and "turn" the stock Asobo A320 autopilot knobs in both directions to increase/decrease values.
The A32NX knobs for me don't work in this way. I can't turn them the same, but they do work if I use the increase/decrease cockpit interaction bindings. Still it would be nice to get these to react to the turn gesture in the same way as the stock Asobo A320 knobs do.

@2hwk 2hwk added the Good First Issue Good for newcomers label May 20, 2022
@shameelx
Copy link

shameelx commented Oct 11, 2022 via email

@Tesch1933
Copy link

The Asobo A320 allows push and pull via the secondary and tertiary key assignment.
This is not the case with the FBW.
To solve the problem, the FBW team would have to make it possible to control the knobs with secondary and tertiary. Like it is with the Asobo A320.
This can't be that difficult. It is only an assignment of the function

@tracernz
Copy link
Member

The knobs can already be controlled with secondary/tertiary in lock mode. I am using them through mouse button bindings to push/pull the knobs.

Again though, nobody on the dev team is using VR controllers and no VR users have contributed any patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good First Issue Good for newcomers
Projects
None yet
Development

No branches or pull requests