Download

How to create thumbstick locomotion in UE4.27 (using the OpenXR/Oculus OpenXR plugins)

So I upgraded today to UE4.27 because I saw that OpenXR was, quoting the Epic Games launcher directly “production ready”

While messing around in the OpenXR template, I realized that the character only had teleportation locomotion (and the documentation as far as I have seen thus far only specifies information regarding teleportation)

for the project I am designing, I require being able to use thumbstick/continuous locomotion, and while experimenting I haven’t found any way to create this (I may just be missing something)

any help would be greatly appreciated, as, due to the extremely recent nature of the update, there are no tutorials yet (and as I mentioned, the documentation isn’t great regarding XR locomotion)
thanks.

1 Like

UPDATE:

I’ve (mostly) solved it. There’s a small issue with my code currently which is causing the character to rotate strangely, but the core movement is fine.

you’ll have to make your own rotation, I’ll add a screenshot of the actual locomotion (left stick) though.

I didn’t have time to edit the vrTemplate for thumbstick locomotion but If I remember correctly, for the head to rotate correctly, in the pawn on begin play you have to enable ‘use controller rotation yaw’.

I’ll give that fix a shot now. The system I designed for thumbstick locomotion shown in my prior message works (other than some errors where I cannot get the VR pawn to collide with anything or be affected by gravity no matter what I try)

As of last week randomly in 4.26, I have a third person project setup to where I could control the pawn while in VRmode of the editor with Axis mappings using the Oculus Touch Thumbstick X / Y, however, now all axis inputs from the Oculus Quest 2 do not work if it’s related to the Thumbsticks.
I re-mapped the axis inputs to the buttons on the controller to see if it was a controller issue, but A, B , X, Y all work fine. Kind of stumped, so curious what you are able to find with this post as I can’t seem to create a post.
P.S - Anyone who knows a possible solution feel free to contact me as I’m quite eager to get beyond this random, and what I’d have thought to be a simple roadblock.

does your movement code look anything like the one I shared a few posts up? That’s a working thumbstick locomotion code you can use (I’m using 4.27 though, so beware if you aren’t)

UE4’s VR systems just seem… unfinished.
for a “production ready” addon, their OpenXR implementation has zero proper documentation and is too new for anyone to really know what’s going on.

1 Like

Here you go! Set up the X and Y joystick inputs, add a CharacterMovement component to the pawn (parent class: Character) and you’re good to go :slight_smile:

1 Like

It’s similar, but for some reason my UE editor doesn’t pick up “MotioncControllerThumb____” as Axis Inputs or Action Inputs options so I had to do it via “Oculus Touch Thumbstick” for some reason, it was working in 4.26 prior to a week ago, but now it’s completely bonked.

Not entirely sure how to get MotionController’s to show up as inputs anymore either, I didn’t change or trigger any updates. Shrugs

Thank you!
I have to figure out how to get the “MotioncControllerThumb____” as Axis Inputs as the next workaround for this issue on my end, they’ve vanished :smiley:



So I attempted the node setup, but it’s not triggering when in VR Playmode on 4.26, I did keep my AxisInput as MoveForward etc though instead of completely renaming it to OculusTouchLeftThumbstick_Y

Edit/Update1: I’ve added the Axis Mappings for Motion Controllers in the ini file, however, after getting back into the project with VRmode, the camera just slowly spins downwards

Yeah the inputs will need to be set to your thumbsticks, you can get the correct inputs from the VR template, i think. You also need to add a ‘Character Movement’ component to your pawn, thats whats acted on by the ‘Add Movement Input’ nodes. You also need to go into your pawn’s Class Settings and change the parent actor to ‘Character’.