Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Utopia 360 BlueTooth Controller Mapping buttons to unity

Discussion in 'AR/VR (XR) Discussion' started by Numonic, Jul 11, 2017.

  1. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Anyone have any good progress mapping Utopia 360 blue tooth controllers to Fire1 and Fire2?
    I've tried duplicating the array in the inputs for Fire1 and Fire2 and switching to Joystick Axis.
    So far no dice in getting it to work wondering if anyone can help me out.
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You can run my free utility on device which will let you know which joystick axis/buttons it uses.

    https://www.assetstore.unity3d.com/en/#!/content/43621
     
    Numonic likes this.
  3. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
  4. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I have a ibuffalo classic usb Gamepad and it works like a charm exposes the buttons quickly I love it. But it has no way of interfacing with the Utopia 360 VR controller I'm currently using. It has A,B,C,D buttons and two more buttons near the joystick that are not labeled.
     
  5. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If the paired utopia 360 controller doesn't fire off any of the items on the UI then it must be using either directinput or some other input type that Unity doesn't support. I believe I had a similar controller though and it did (does it have a switch on the controller for various modes it can be placed in)? Also are you trying this in editor (PC) or on device? They will usually register different axis on different platforms.
     
  6. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I tried connecting the controller on my pc via bluetooth, it's paired on my samsung galaxy phone but on the pc it wouldn't pair or connect. The switches it has are for Android and iOS. I'm trying it on the editor and worked great with my usb controller.
     
  7. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If the controller is specifically made for android/ios it might not have drivers on pc (even if it pairs). I'd run the utility on android or ios and see if that works. Most of the time the joystick axis numbers unity provides are different between PC and mobile anyways so using the same values as the editor usually doesn't work anyways on device.
     
  8. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Thanks I've sent a message to the Utopia 360 people with questions about their controller and if there is a sdk or a driver I can some how use for it. I have many ideas i'd like to use with it.
     
  9. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I was mapping and coding the controllers in pc but testing in the Samsung Galaxy phone.
     
  10. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    This might work for a few select controllers, but a lot of times it will be different. For example the triggers are axis 3 on PC but its the right stick on android. If your end goal is gear vr you should run the utility on android and put those values into the input manager in the editor (doesn't have to be vr in android its the same as non vr android).

    If you luck out and they don't conflict you might be able to do both pc and android but a lot of times you can't.
     
  11. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Sounds interesting I'm using GoogleCardboard
     
  12. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Same would apply for cardboard, with the addition that cardboard also supports IOS. So if you are targeting cardboard IOS you should also check there. That being said Unity and IOS has moved on from Icade to mFi and I that controller isn't mFi certified so I doubt it will work with Unity on IOS. When the switch is on IOS I have a feeling it is using iCade which Unity won't recognize without 3rd party additions (but doesn't hurt to check).
     
  13. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Having no good progress.
     
  14. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If nothing pops up at runtime on any of the platforms, then Unity is not recognizing that controller. The scene that's included is just a direct query to unity on all the axis and button numbers.

    I looked at my vr controller and while the shape is similar to yours it's not the same brand. I think I've seen the Utopia ones on clearance at my local walmart for $1 so whenever I get back there if they still have it for the same price I'll pick one up as well (although that's very cheap and I would think there is a reason they are that cheap).
     
  15. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    That is pretty cheap they charged me $12 for the thing and the led doesn't even light up to show it's on jip lol. Either way I purchased it as a entry point for me to work with VR and learn some more then eventually I would like to move to either occulus or vive but I'm steering away from Google dream as I'm not crazy about the Pixel phone they have.
     

    Attached Files:

  16. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Hey just wondering were you able to get the cheaper version of the VR park controller and have buttons mapped?
     
  17. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I'm heading to Walmart tomorrow, hopefully they still have them for so cheap. If they do I'll pick it up.
     
  18. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I went to walmart and picked up what they had left (5 of them $1 each). When I got home only 3 out of the 5 worked (obviously you get what you pay for their QC must stink). The ones that do work actually do have a led that is only blinking when pairing. That being said the mappings work just fine I could run my setup scene both on pc or android.

    The joystick is axis 1 for horizontal, axis 2 for vertical but needs to be inverted.
    The 4 face buttons are 0,1,3,4 and the bumper and trigger are 6 and 7. The "at" and "power" button aren't mapped to Unity.

    If you are not seeing anything pop up when you run that scene with a paired remote with the switch in android mode (for both trying out on PC and android) then I think you got a dud and should return it (you could go for another one but if their qc is that bad I'd just get something better though I don't know if there any name brands in that style). They also seem to rebrand it a lot with different packaging but same thing. The below link is what my packages looked like. Maybe try your local walmart and see if they are a dollar there too if you're in the states. Walmart markdowns are by store so might not be the same though.

    https://images-na.ssl-images-amazon.com/images/I/810mzt-4wtL._SY445_.jpg

    Hope that helps.
     
  19. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Thanks so much I mapped the the buttons like this and when I do a text build and run the controller the horizontal controls work they've always worked it's the buttons that never worked for me odd.
     
    Last edited: Jul 21, 2017
  20. depthSensor

    depthSensor

    Joined:
    Feb 21, 2018
    Posts:
    1
    I got it working with android in @c mode, if you don't know what that is watch
     
  21. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Sorry for the late reply I had all that working all fine, problem is mapping the buttons to unity.
     
  22. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I was able to get it to work first you have to activate the mouse inputs of the controller.


    @+D this goes into mouse mode you can then get the cursor on the bottom left of the screen and go a head and use the Trigger 6 or 7 mapped to play your game like a gun feature or something.

    //This gets button the VR Box to work.
    // You need to press @ + D on the VR Box or VR Park //Goes into mouse control
    // Then adjust the mouse on the botton right of your screen
    //Press the Trigger 7 button to work on the VR Park
    public void VRBoxInput()
    {
    if (Input.GetMouseButton(0))
    {
    vrbox_OrPark.gameObject.SetActive(true);

    print("pressing button");


    }
    else
    {
    vrbox_OrPark.gameObject.SetActive(false);

    }
    }
     
  23. jpatrick75

    jpatrick75

    Joined:
    Oct 31, 2018
    Posts:
    1
    In case anyone was still looking for this information. I just used the asset mentioned by greggtwep16 and it worked like a charm. I mapped the Utopia 360 vr controller on a windows pc. First off the controller can only be paired to one device at a time so delete it from any nearby devices before trying to pair it. Secondly the asset will recognize the controller in the B mode (press and hold the @ button and the B button until the light goes on then release). Below are the results I got.
    (BTW: I was holding the controller in one hand like a TV remote.
    Axis
    1- Forward - Negative/ Backward - Positive
    2- Left - Positive/ Right - Negative
    Buttons
    A - 4/ B - 0/ C - 3/ D - 1
    Forward Buttons
    Lower - 6
    Upper - 7

    Hope this helps anyone trying to use this controller.
    Good Luck!
     
    greggtwep16 likes this.