I spent all evening figuring out how I could get some bluetooth controller input into unity for vr development (need some input buttons )
I managed to pair a PS3 controller with my iMac and I also was able to do all keymappings, but⦠a ps3 controller cannot be paired with an android phone unless it is rooted (a no go for me)
The I tried a little vr controller called vr box controller (couple of dollars) and that controller could pair with my iMac and I even could check buttons with the Mac App āEnjoyableā where It really read buttons and their corresponding numbers. But in unity ⦠a no go.
So now Iām actually looking for a make / model of controller that is actually working, even if I could only read 1 single button from it. Anyone have tips/hints ? What do you use yourself ?
I understand, but please allow me to clarify. Iām not looking for a way to enable a vr controller or gamepad in a game which I want to put on the playstore.
I just look for 1 controller which is known to work with at least 1 button to pair on my personal phone. Iām a primary school teacher and would like to create some very small immersive activities in unity which should happen in vr and where kids need to trigger something.
The VR glasses (cheap mount) have a button on them which act as a screen tap, so technically speaking I could use that button, but Iād rather let the kids have 1 or more buttons on a gamepad.
I do understand for 100% that releasing a game relying on a gamepad (on the play store) is asking for troubles because almost nobody will be able to play it, but I need kids to look at things and then push a button to confirm that hey want to select something (or shoot something). Gaze input is not the best solution in this specific case.
In 1 or your videoās you even show a cube being moved by a bluetooth controller, so there are in fact controllers that work. Iām only looking to find 1 of those controllers for 1 specific in-house game which will run on exactly 1 vr headset
Hopefully somebody can give me names or links to controllers that DO work.
I do understand that the most immersive way is with gaze input, but I really need this for this 1 specific case
iāve seen people plugging even normal mouse to android devices⦠i guess that would register as mouse clicks in unity?
(without showing cursor, just use the button clicks)
other alternative
tap detection (using gyro to detect if user tapped the helmet/device hard enoughā¦)
I use a Mad Catz Micro C.T.R.L.R. for VR-sessions on my Nexus 5X. In Unity scripts the state of the input buttons and axes can be read by Input.GetAxis().
I havenĀ“t tested on Mac, but bluetooth controllers like VRBox works fine on Android. It maps to Input.GetAxis() for the joystick, and GetButton() for fire1 and fire2, jump, ācardboard-buttonā, and so on. One trick is to select mode for the controller. Function key @ + B, sets the controller in game mode for the inputs to work. If you select @ + D, it works like a normal mouse with a mouse cursor on your phone display (in game mode, only the A, and D buttons, and the joystick are active).
Since SteelSeries and Moga got mentioned: Has anyone got the right keybinds for them?
I own both a SteelSeries Stratus XL and a Moga Pro Power and none of the buttons work with e.g. ājoystick button 0ā (which should be the āAā button) in the InputManager. My code does work on PC with the Xbox 360 controller, which you canāt use with your phone.
PS4 controllers work. They do have a little lag, so I usually connect with OTG cable. And the button/axis mapping is not the same as all other controllers, but still very usable and a lot of people have these controllers already. Here is the mapping for the buttons on android (using āCross_Platform_Inputā in player settings and the standard āInput Managerā:
X, joystick button 1
Circle, button 13
Triangle, button 2
Square, button 0
R1, button 14
R2, button 5
R3, button 10
L1, button 3
L2, button 4
L3, button 11
Start, button 7
Select, button 6
Touch Panel as button, button 8
the standard X and Y axisās can be used for the left analog
the right analog axisās are the 14th and 15th axis.
I forgot the axisās for the directional pad though.
Also, these may not necessarily be the correct button mapping for PS4 controllers on non android devices (PC, etc.).
Iāve used this mapping for bluetooth and non bluetooth connections to at least a handful of different android devices , from cheap pre-paids all the way to pixels.