aircraft icon indicating copy to clipboard operation
aircraft copied to clipboard

VR controller - cannot push/pull autopilot knobs

Open dataslug1 opened this issue 3 years ago • 35 comments

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 avatar Jan 27 '22 16:01 dataslug1

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.

tracernz avatar Feb 17 '22 04:02 tracernz

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

CORNU76 avatar Feb 26 '22 10:02 CORNU76

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

CBRadi0 avatar Mar 06 '22 00:03 CBRadi0

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

hzyoni avatar Mar 06 '22 03:03 hzyoni

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.

chrisaut avatar Mar 13 '22 00:03 chrisaut

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

hzyoni avatar Mar 13 '22 01:03 hzyoni

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.

chrisaut avatar Mar 13 '22 13:03 chrisaut

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

hzyoni avatar Mar 13 '22 15:03 hzyoni

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

dataslug1 avatar Mar 19 '22 10:03 dataslug1

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.

https://user-images.githubusercontent.com/8252355/160242466-0d63202a-7473-4837-96e5-73f4c9e14bbf.mp4

chrisaut avatar Mar 26 '22 13:03 chrisaut

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!

dataslug1 avatar Mar 27 '22 09:03 dataslug1

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.

chrisaut avatar Mar 27 '22 11:03 chrisaut

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 ?

shameelx avatar Mar 27 '22 13:03 shameelx

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.

hzyoni avatar Mar 27 '22 18:03 hzyoni

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

chrisaut avatar Mar 27 '22 21:03 chrisaut

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

hzyoni avatar Mar 28 '22 00:03 hzyoni

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 !

dataslug1 avatar Mar 28 '22 09:03 dataslug1

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

shameelx avatar Mar 28 '22 13:03 shameelx

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

dataslug1 avatar Mar 28 '22 13:03 dataslug1

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?

shameelx avatar Mar 28 '22 13:03 shameelx

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)

chrisaut avatar Mar 28 '22 14:03 chrisaut

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.

shameelx avatar Mar 28 '22 14:03 shameelx

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.

chrisaut avatar Mar 28 '22 14:03 chrisaut

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

shameelx avatar Mar 28 '22 15:03 shameelx

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 avatar Mar 28 '22 20:03 dataslug1

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

dataslug1 avatar Mar 29 '22 10:03 dataslug1

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

hzyoni avatar Mar 29 '22 11:03 hzyoni

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

dataslug1 avatar Mar 29 '22 13:03 dataslug1

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.

AndLindemann avatar Apr 21 '22 13:04 AndLindemann

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

fjch1997 avatar Apr 21 '22 16:04 fjch1997