I am trying to integrate VR support into my game. I started from the First Person template. Got almost everything working except for a few things:
1 - The player moving in the real world causes the VR camera to move inside of the pawn, instead of staying at 0,0 XY relative to the pawn and the pawn moving (what i’m trying to do is move the pawn based on the HMD’s movement, instead of moving the active camera inside the pawn XY-wise);
2 - The editor does not see any controller inputs other than their position (the Motion Tracker Components move), such as “Oculus Touch (L) Thumbstick Up”, earlier today it did receive input for the L Controller Y button and R Controller B Button at least, now it does not pick up any. However, in the input config screen (project settings) it recognises some inputs as Valve Index trigger inputs. My workflow is PC, Editor/Game ↔ SteamVR ↔ Steam Link (Quest II) ↔ Quest II Screen, inputs, SteamVR theatre and so on. “<->” indicates two-way communication.
This is my first post on this forum, so sorry if something is off or i forgot to tag something.
Any help is appreciated!
I have also sketched a quick preview on what i’m talking about.
I have found a few workarounds myself.
For the VR Camera moving inside the pawn: temporary fix is to, every frame, reset the HMD’s position via the “Reset Orientation and Position” node.
As for the inputs not firing, in the HMD in Steam Link i had to set up my custom control scheme, where any thumbstick input is only received if using “Oculus Touch ([Controller]) Thumbstick [Direction]” input key in project settings AND in the HMD itself the input is configured to fire on “Touch” as “DPAD” (Each thumbstick direction gets configured as a separate DPAD input “block” in Steam Link, so:
L Thumbstick -> Use As DPAD (Touch, North: VRMoveForward, East: None, South: None...);
-> Use As DPAD (Touch, North: None, East: VRMoveRight, South: None...);
and so on). However this only allows the thumbstick to send input values of either 0.0 or 1.0, so basically no axis input, e.g. no slow walking.
The thumbstick directions are boolean inputs. They won’t work at all with the OpenXR plugin, since it would require an extension that Unreal hasn’t implemented (and even then it would only work with SteamVR). Use the Thumbstick X-Axis and Y-Axis inputs instead. They provide the full analog range.