[8bitdo zero controller] Get D-PAD Events (Android)
Hi,
I recently got an 8bitdo zero and found that Event.current.keyCode.ToString() gives the following values :
// 8bitdo zero controls
// Keycodes :
// JoystickButton0 = A
// JoystickButton1 = B
// JoystickButton2 = X
// JoystickButton3 = Y
// LeftShift = L
// RightShift = R
// Return = Start (middle right button)
// Pause = Menu (middle left button)
(added because it may help some other)
But I cannot find a way to get the DPad events. It does work because it allows me to control my phone (navigating in menus) but no event seems to show. (note : GetAxis("Horizontal") and vertical gives nothing)
Does anyone has a solution ?
Thanks in advance
Hey the inputs seem different now from what you posted. (this is for the NES30 Pro) I now notice you were talking about the 'zero'. Regardless I'll leave this here in case it helps someone.
// 8bitdo zero controls
// $$anonymous$$eycodes :
// JoystickButton0 = A
// JoystickButton1 = B
// JoystickButton3 = X
// JoystickButton4 = Y
// JoystickButton6 = L1
// JoystickButton7 = R1
// JoystickButton8 = L2
// JoystickButton9 = R2
// JoystickButton10 = Select
// JoystickButton11 = Start
// JoystickButton13 = LS
// JoystickButton14 = RS
Answer by Map-Builder · Jul 29, 2017 at 09:02 AM
It may be a standard problem with controllers on android :
http://answers.unity3d.com/questions/1246569/steelseries-nimbus-gamepad-d-pad-not-recognized.html
but the dev of "rewired" plugin for unity seemed to be able to implement the 8bitdo zero support in its plugin. If any one of you got an idea. Please tell me. Thanks
So I used Input.GetJoystickNames() and it seems that it is well recognized but didn't work with GetAxis("Horizontal") and vertical but I don't know how but I probably did press by error D-Pad and A and it worked. It seems that joystick simulation is made that way.
Currently still looking for a solution.
Hi, Thanks for your response first. I have solved my issue by adding Input.GetButton("Fire1") in GVRBasePointer script's method:-
public virtual bool TriggerDown { get { bool isTriggerDown = Input.Get$$anonymous$$ouseButtonDown(0) || Input.GetButton("Fire1"); return isTriggerDown || GvrControllerInput.ClickButtonDown; } }
Answer by sumit47 · Mar 30, 2018 at 02:55 PM
i am facing a little bit different issue, in my case dpad is working but i am unable to make a click event. Any solution ?
what do you mean exactly ?
Input.GetButtonDown("NameOfTheEvent") ?
Your answer
Follow this Question
Related Questions
Unity Android Controlls with CrossPlatformInput 1 Answer
Android Hourly Events 1 Answer
3d bird controller 0 Answers
controller bluethoot andorid 1 Answer
Using a Phone as a Remote Control and Cross Platform Input 0 Answers