Please help with the motion controller setup

I am on UE 4.16.1 (stock) and this is my initial setup (on tick EV_GearVRController is called):

Controller shows up in the game (since I run dev build from apk, I have to press any button on the controller for it to initialize), but it doesn’t rotate with camera (doesn’t stay on the right side) as I turn 360 deg. in the swivel chair. Also, pressing trigger button does nothing (action is mapped to Motion Controller R trigger in the project’s Input settings).

I checked sample from github, but it’s not even remotely related to Gear VR controller (I didn’t see the component or any BP nodes related to it used).

I am not sure if Enable Arm Model node works at all - the tool tip on it is from CPU/GPU node and there no docs on what it does (I assume it should automatically place controller into its default position and have it swinging as user tilts/turns/rotates it, similarly as it’s in the Dead and Buried for Gear VR).

Could you please explain how to get it going ?

Thanks beforehand

P.S. On top of that controller doesn’t duplicate touchpad functionality - nothing happens when I press touchpad on the controller (thus, it’s doesn’t duplicate touchpad on the HMD). Someone tested my app before I added BP nodes for the controller and the effect was the same - controller’s touchpad didn’t do what it suppose to do.

Have you tried different settings for “use controller rotation yaw” on the character? I think that one caused similar problems for me once. (Or maybe it was “Use Pawn Control Rotation” on the camera.)

What does “use controller rotation yaw” have to do with motion controller?

It might control if the motion controller (indirectly attached to the CapsuleComponent and not the Camera) follows when the camera i rotated. Just a suggestion…

Not sure what you mean by this but the controller simulates being at the end of your arm - you don’t need to do anything special here. It should not rotate with the camera it only rotates when you move your arm. So if you keep your arm still and just move your head around the controller does not move :wink:

For the trigger I use “MotionController (R) Trigger” for the trigger which works fine. Perhaps try it without the mapping first to make sure it’s not a problem with that?

Imagine you look to the north and controller is on the right side of you. Then you turn 180 deg. and face south. Controller should be still on the right side, but it’s now on the left. That’s how it works for me. That’s why I won’t WTF!? (my guess is I have to update it’s location every tick to make it remain on the right or left side, depending on what hand was chosen).

Without mapping it doesn’t show up for me (unless I am overlooking it) among the BP nodes on right click.

that’s strange - stays on the right for me when turning 180degrees (you can see in the menu of my game) - I didn’t do anything special on tick

that’s even stranger - this is a default engine node that should show up all the time and no doubt your problem lies there :wink:

What’s your setup? What engine do you use, stock 4.16 or Oculus branch 4.15 ?

I believe the rotation problem you are experiencing is related to the gearvrcontroller not being attached to your camera anchor. From my own tests it must be added to the camera anchor the same way the camera is. Once attached you should set the relative location to 0,0,0 just like you would with your camera.

As far as the trigger not working I used the motion controller R trigger input node and that worked fine for me, as far as unreal is concerned either motion controller trigger should be fine.

Hope that helps

Did that - no go. Same effect as parenting GearVRController to the capsule and not to the camera anchor :frowning:

I removed input mappings from the Settings, added Motion Controller R Trigger node and … wait for it… it didn’t work anyway :confused: As if trigger and touchpad on the controller are blocked, while volume, home and back buttons work fine.

It’s a boy! New development - apparently when multiview + multiview-direct are enabled, no 2D screen rendering stuff works (Print Screen doesn’t work, console doesn’t work, who knows what else doesn’t work).

Sounds like a massive bug to me - makes it debugging Gear VR even harder than it already is.

When I disabled those fancy rendering features, suddenly trigger started working. Now the only issue I have is with “arm”.

Problem partially solved - GearVRController component can not have an offset. It has to be at 0,0,0. Removing offset fixed the “arm” issue for me.

Touchpad mapping is an issue that doesn’t seem like going to be resolved :frowning: Filed the bug here and also reported it to Oculus:

Sounds like it’s a no-fix most likely (unless Oculus offers better integration).

Yeah but it’s no blocker - just add a little extra BP logic:

if controller not active then use the usual Touch Input node
if controller active then use Motion Controller Thumbstick X & Y as per the Oculus Controller example project (when I switched the default controller they are using there with the proper gearvrcontroller component you can see the touchpad of the controller in action.)

I don’t use touch input at all. I use mouse X and Y, as per Oculus specs, for the HMD’s touchpad.

I wonder why Any Key node reports entirely different values for controller’s touchpad presses and touches :confused:

Where did you get a working example for Gear VR controller? Whatever is on the github is horrible and doesn’t even have GearVRController component.

Like I said I modified that project:

“I switched the default controller they are using there with the proper gearvrcontroller component you can see the touchpad of the controller in action.)”

Here it is:
very simple and horribly setup but shows the touchpad working at least :smiley:

Aye, thanks, I’ll check it out.

What do you mean by “camera anchor” please? Can you post a screenshot of how you would set this in your character BP?

FYI: Oculus have deprecated the GearVR controller component in 4.17 - so best to rework your project already to just use the default engine’s motion controller and grab the mesh from the plugin folder: