Unity 5.6 and SamsungGearVR D-pad Movement

Hey all;

New to the forum and was looking for some help with Using Unity and a Samsung Gear VR i have. Im pretty Noob so forgive my lack of knowledge on the subject, so far i have done everything to develope and put the Unity scene and put it on the phone and see it with the glasses that isn’t the problem; the problems arises when i have to move around with the D-Pad located on the rift itself.

Ive looked over multiple help files and forms to no success; i guess my question is how do you make the stock OVRCameraRig work to move around the scene with the goggles?

Or can anyone direct me to a place to download a prefab camera rig that i could just drop in the scene to work?

I appreciate all the help!

thanks!

Other than the touchpad on the Gear VR HMD being swipe based and not absolute it’s fairly straightforward. This does mean you always have to swipe to get values you like, meaning lets say you want to go right you have to touch and swipe to the right to do that, you can’t just touch the right of the touchpad.

Some other general caveats exist like you can’t move the gameobject that the camera is directly attached to as it’s owned by the HMD tracking. In general you want to move the parent of those gameobjects. Post what you have currently and we can take a look.

Awesome; okay. im Still really new to Unity and im trying to use just the default OVRprefabs that are in the assets, enclosed is the prefab and the script with the prefab. my main goal is just to get locomotion with the d-pad. enclosed is the default script.

3065355–230414–OVRPlayerController.cs (14 KB)

That script is for the Oculus Rift, it has a lot of stuff in there that doesn’t apply to the Gear VR especially when just HMD only and not using the motion controller.

The following is Oculus’s main documentation. There are nice pictures at the bottom that show on each platform (rift, gear vr, etc.) what each corresponds to.

https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/

So things that you see in that script for the right like:

Vector2 primaryAxis = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick);

could be changed to:

Vector2 primaryAxis = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);

This in your custom script would respond to the touchpad (it would actually respond to either the HMD or the motion controller but you have to remember the HMD is swipe based unlike the motion controller). There are a lot of things in that script that are rift only, I’d really recommend just getting a feel for the basics of their API and then go from there.