cancel
Showing results for 
Search instead for 
Did you mean: 

Developing in In Unity Gamepad Not working

HiroKiro
Honored Guest
Hi All.

I am developing in Unity and after wacthing the youtube demonstration

https://www.youtube.com/watch?v=QgYwZzHxCOs&list=UUoBP0GkJ3jFpSejSnuRgl9Q

he was using the Samsung EI-gp20 controller while developing. When I try to use my same controller it fails . I connect with bluetooth fine but will not do anything unless I push and install the apk on the phone itself and pair it to the phone which defeats the purpose to program in unity gamepad control.

The guy in the video is using a Mac .. I am using win7 pro 64.

Any help would be much appreciated .

Sincerely,
Hiro Kiro
12 REPLIES 12

cybereality
Grand Champion
Can you be more clear as to what exactly you are trying to accomplish?

Also, do you receive any sort of error messages or warnings?
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

HiroKiro
Honored Guest
Hi.

The demo shows he just presses the Play button in the unity editor and

his bluetooth controller is usable . he moves around in the Scene window.

when I try my controller"e-gp20" nothing happens.

cybereality
Grand Champion
Do you have bluetooth support on your PC and have you already paired/setup the controller?
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

HiroKiro
Honored Guest
Hi,

I am able to detect the device but does not pair immediately and when it does it still has no HID service.

If I install bluesolei 10. then restart and delete bluesolei. then scan hardware and default bluetooth drivers

will actually find the device and ask to pair. after it pairs I then 50% have control with the gampad.

if I remove the blutooth usb and plug it back in I lose the HID service again and the gamepad stops working..

I am sure if Its probably a cheap bluetooth usb I bought for a few dollars years ago is just buggy .

I have another Question. How do I access the Touchpad input in Unity for the GearVr. I see a ovrtouchpad.cs

script but I dont see how it is accessed . I just want to get a Tap response in my app. Thank you very for your time.

cybereality
Grand Champion
Yes, you can try with a different Bluetooth adapter or software stack.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

Hammo
Honored Guest
"HiroKiro" wrote:
Hi,

How do I access the Touchpad input in Unity for the GearVr. I see a ovrtouchpad.cs

script but I dont see how it is accessed . I just want to get a Tap response in my app. Thank you very for your time.


Does anyone have an answer to this query ? I also cannot figure out how to detect any input on the GearVR

drash
Heroic Explorer
"Hammo" wrote:
"HiroKiro" wrote:
Hi,

How do I access the Touchpad input in Unity for the GearVr. I see a ovrtouchpad.cs

script but I dont see how it is accessed . I just want to get a Tap response in my app. Thank you very for your time.


Does anyone have an answer to this query ? I also cannot figure out how to detect any input on the GearVR


At a very basic level, the touchpad basically acts like a mouse, so you can simply do this to find out when the user has released their finger from the touchpad:

if(Input.GetKeyUp(KeyCode.Mouse0))
{
//TODO: Insert code here to respond to releasing finger from touchpad, but you won't know how long that touch was, or if they moved around on the touchpad, etc)
}

Or, if you want to be a bit more precise, you can try to make use of OVRTouchpad.cs. Wherever you plan to use it, make sure you've first called OVRTouchpad.Create() at the beginning, and then wire up a function that will be called whenever OVRTouchpad's TouchHandler event occurs.

For example if you're setting this up in a Monobehaviour (a component that's part of the game loop):

In Start():

OVRTouchpad.Create();
OVRTouchpad.TouchHandler += HandleTouchHandler;

And elsewhere in that same class:

	void HandleTouchHandler (object sender, System.EventArgs e)
{
OVRTouchpad.TouchArgs touchArgs = (OVRTouchpad.TouchArgs)e;
if(touchArgs.TouchType == OVRTouchpad.TouchEvent.SingleTap)
{
//TODO: Insert code here to handle a single tap. Note that there are other TouchTypes you can check for like directional swipes, but double tap is not currently implemented I believe.
}
}


If you want to get fancy and monitor how the finger moves on the touchpad for something other than a basic swipe or tap, you'll need to implement your own logic to watch the "mouse movements" of the touchpad and act accordingly.

Hope that helps!
  • Titans of Space PLUS for Quest is now available on DrashVR.com

kayyo
Honored Guest
"HiroKiro" wrote:
Hi.
The demo shows he just presses the Play button in the unity editor and
his bluetooth controller is usable . he moves around in the Scene window.
when I try my controller"e-gp20" nothing happens.


I am on Mac (Yosemite) and paired the game pad successfully. But it behaves like a mouse. The only thing I can do is moving around with the right analog stick (in any application). It works great in conjunction with the gear.

Console output of Input.GetJoystickNames () is empty.

Is there anything special to do in order to make this running with the MacBook too?

cebrown123
Honored Guest
Same problem here. I am on a Macbook Pro, same as in the Youtube video (linked above). In the video regarding the Samsung gamepad and the OVRPlayerController he says that "it just works", but that doesn't seem to be the case. I cannot get any response from my Samsung gamepad on my Mac except for one button. Any help greatly appreciated.