Search Unity

Controller Input in iOS and Andriod

Discussion in 'Input System' started by kislotaooankit, Aug 10, 2020.

  1. kislotaooankit

    kislotaooankit

    Joined:
    Apr 20, 2020
    Posts:
    15
    Hey All,
    I have been wondering is it possible to take controller input via Bluetooth in android and iOS ?

    As far as i know its possible to code for pc and test it in unity itself ,but i dont have any idea of how to process input of controller(like xbox/ps4 or anyother joystick) for handheld devices(android and iOS).

    Can i get any help or reference where i can learn to implement my requirement ?

    Thankyou !!
     
    Last edited: Aug 29, 2020
  2. skirners1

    skirners1

    Joined:
    Sep 4, 2014
    Posts:
    9
    You can try the InputSystem, and a Xbox or PS4 controller. They both work with Bluetooth. However be prepared for some latency on iOS and Android. Otherwise Rewired and InControl Assets are highly recommended.

    there are plenty of tutorials out there on google.
     
  3. kislotaooankit

    kislotaooankit

    Joined:
    Apr 20, 2020
    Posts:
    15
    Hey i tried to implement them but they arent registering any input in my android device Do i need any specific code for asking Bluetooth permission ?
    I am using XBOX One Controller and my input system binding looks like this.

    upload_2020-8-28_16-27-32.png

    You mentioned there are plenty of tutorials for implementing but i couldn't find any specific to to take input from joystick in Hand held devices
     
    Last edited: Aug 29, 2020