Samsung Gear controlls - Unity 3D

750 Views Asked by At

I use Unity 3D with Samsung Gear. I have a working OVRPlayerController in my scene but I am having difficulties mapping the oculus tap, swipe and return button.

I have tried with something like:

if (Input.GetMouseButtonDown(0))      
{            
   Debug.Log("input detected");
}

And with this I detect the tap encircled in red enter image description here

I have tried also something like:

if (OVRInput.Get(OVRInput.Button.PrimaryThumbstick))
    {            
        Debug.Log("Input detected");
    }

Or :

if (OVRInput.Get(OVRInput.Button.One))
    {
        Debug.Log("Input detected");
    }

But nothing seems to work. Is there any documentation that explains how is the input mapped on Samsung Gear that I encircled in yellow ? Does anyone have experience with this or can maybe guide me to some useful documentation on this matter ?

Cheers

My project settings for input:

enter image description here

1

There are 1 best solutions below

0
On

For swipes, you can get the current Vector2 on the touchpad (either the HMD and/or the incoming remote controller touchpad) by using:

CurrentVector = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);

as for the back button, it is accessible using OVRInput.Button.Back either on Get, GetDown or GetUp. But know that a 2 seconds long back press is reserved for the Universal Menu and should not have any implications inside your game or app.