WORKAROUND -- Using VR Oculus Touch Controllers in FS2020

Hi

I have been using Oculus Touch Controllers as Total VR control for a while in other games, DCS and IL2. I was disappointed that I had to dig out my trusty MS FF2 stick to play FS2020. Using the same setup I use for DCS I tried it in FS and it works a treat.


My system Is i5 with GTX1070 Oculus CV1. Don’t know if it will work with other headsets.

The right hand controller provides rotational aileron and elevator control, the B button for Flaps up and the A button for Active pause.

The left controller uses the joystick X axis for rudder input and Y axis for throttle. Button X for Flaps down.

Voiceattack is used to control all other functions I need to pootle around in the 152.
Menu, Air traffic, Map, Parking brake…etc

The two programs required are Virtual Joystick (Vjoy) and Auto Oculus Touch.

If anyone is au fait with these programs and wants to try it out I have provided a script below, just copy and paste to a new notepad and save as VR2020.ahk (any name you like but must end in .ahk)
(The script look weird in post preview but it is all there)

Copy from below the line…


#include auto_oculus_touch.ahk

; This is used to treat the trigger like a button. We need to remember the old state.
oldTrigger:=0

; Start the Oculus sdk.
InitOculus()
InitvJoy(1)

; Main polling loop.
Loop {
; Grab the latest Oculus input state (Touch, Remote and Xbox One).
Poll()

; Get the various analog values. Triggers are 0.0-1.0, thumbsticks are -1.0-1.0
leftIndexTrigger  := GetTrigger(LeftHand, IndexTrigger)
leftHandTrigger   := GetTrigger(LeftHand, HandTrigger)
leftX             := GetThumbStick(LeftHand, XAxis)
leftY             := GetThumbstick(LeftHand, YAxis)
rightIndexTrigger := GetTrigger(RightHand, IndexTrigger)
rightHandTrigger  := GetTrigger(RightHand, HandTrigger)
rightX            := GetThumbStick(RightHand, XAxis)
rightY            := GetThumbStick(RightHand, YAxis)

; Get button states. 
; Down is the current state. If you test with this, you get a key every poll it is down. Repeating.
; Pressed is set if transitioned to down in the last poll. Non repeating.
; Released is set if transitioned to up in the last poll. Non repeating.
down          := GetButtonsDown()
pressed       := GetButtonsPressed()
released      := GetButtonsReleased()
touchDown     := GetTouchDown()
touchPressed  := GetTouchPressed()
touchReleased := GetTouchReleased()

; Now to do something with them.
    SetvJoyAxis(HID_USAGE_X, leftX)
    SetvJoyAxis(HID_USAGE_Y, -leftY)
    SetvJoyAxisU(HID_USAGE_Z, leftIndexTrigger)
    SetvJoyAxisU(HID_USAGE_RZ, rightIndexTrigger)

            
    if pressed & ovrA
    SetvJoyButton(1,1)
if released & ovrA
    SetvJoyButton(1,0)
    if pressed & ovrB
    SetvJoyButton(2,1)
if released & ovrB
    SetvJoyButton(2,0)
    if pressed & ovrX
    SetvJoyButton(3,1)
if released & ovrX
    SetvJoyButton(3,0)
    if released & ovrY
    SetvJoyButton(4,1)
if released & ovrY
    SetvJoyButton(4,0)
    if pressed & ovrEnter
    SetvJoyButton(5,1)
if released & ovrEnter
    SetvJoyButton(5,0)
    
if pressed & ovrLThumb
    SetvJoyButton(8,1)
if released & ovrLThumb
    SetvJoyButton(8,0)
    if pressed & ovrRThumb
    SetvJoyButton(9,1)
if released & ovrRThumb
    SetvJoyButton(9,0)

    if leftHandTrigger > 0.7
    SetvJoyButton(6,1)
    else
    SetvJoyButton(6,0)

rightHandTrigger := GetTrigger(RightHand, HandTrigger)

down          := GetButtonsDown()
pressed       := GetButtonsPressed()
released      := GetButtonsReleased()

    if rightHandTrigger > 0.5
    {
            pitch :=GetPitch(RightHand)
            yaw   :=GetYaw(Righthand)
            roll  :=GetRoll(RightHand)
    }
    else
    {
            pitch :=0
            yaw   :=0
            roll  :=0
    }

    SetvJoyAxis(HID_USAGE_RX, (roll)/90.0)
    SetvJoyAxis(HID_USAGE_RY, (pitch)/45.0)
    ;SetvJoyAxis(HID_USAGE_RX, (yaw)/40.0)

Sleep, 10

}


My Vjoy setup


My sensitivity settings

1 Like

Yeah no this is way too crazy, I suggest just using this (Or modifying a little setting from source to get static throttle) or following my SteamVR, platform agnostic tutorial here.

Catchy subject but only interesting in my view if you manage to make the touch controllers act as the mouse and not replace joystick axis/buttons

The what? If you want them to work as mouse just use a remapper and adapt one of the three methods mentioned here. You can use Xpadder for the remapping NPNP. A direct controller to mouse interface is impossible without a direct modification, since it’s using direct mode and infinite surfaces. Also Asobo went out of their way to make it so mice or keyboard virtualization does not work, so only incremental input and windows touch keyboard work unless you want to have an unpayable experience… In short absolute mouse position is impossible, kinda like connecting a TeamViewer phone to a PC and trying to play shooters. It just can’t work unless you activate trackpad mode.

What is a benefit of using touch controllers over HOTAS or even better a Yoke System? Isn’t it a bit too clumsy with touch controllers?

Hello Boxdominator,

A good question… HOTAS or a good yoke system is probably better for most but personally I find using Touch Controllers more immersive, carrier landings with the F18 in DCS are good fun. I get a lot of controller lag with my ancient Sidewinder FF2, whereas Touch Control is lag free.
The devil in me drove me to get my touch controllers working with FS2020. I am pleased with the final results, albeit limited without being able to reach out to touch switches and levers but am sure MS is working hard to bring us the full monty.

Enjoy the game. :small_airplane:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.