Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Easy Input for Gear VR and Oculus Go [Released]

Discussion in 'Assets and Asset Store' started by greggtwep16, May 2, 2017.

  1. jokers27

    jokers27

    Joined:
    Apr 20, 2018
    Posts:
    3
    In "Affected the manor", (horror game on oculus store for gear vr) you don't need to swipe on the headset to move,hold a click work perfectly and you stop moving foward instantly when u release. I made some test and by modify a line in OVRPlayerController by: Vector2 primaryAxis = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad); and those line by
    if (OVRInput.GetDown(OVRInput.RawTouch.Any))
    {
    myTextbox.text = "getdown";
    moveForward = true;
    dpad_move = true;
    }
    if (OVRInput.GetUp(OVRInput.RawTouch.Any))
    {
    myTextbox.text = "getup";
    }
    i was able to show "getdown" on my textbox when i press any headset key without swipe and "getup" when i release the key. So now the only thing i don't see is how to say while "getdown" continue to move forward until "getup" because the movement is done later in the code after other calculation.

    I guess you know exactly how to complete the last part.
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If you're treating it as one large button that's fine. My point for the HMD only scenario was start your touch on the left side of the pad and it will start at 0,0 coordinates. Start your touch on the right side of the pad and it will start at 0,0 coordinates. So things like moving in a touchpad like manner required swipes (you look to be only ever moving forward in the direction of the HMD). Also, if you wanted to carve the pad up into 4 buttons you also needed to swipe. If you wanted the touchpad to be a single giant button then yes that was fine HMD only but only the simplest of games could get by with that.

    The motion controller touchpad's behave more like a normal touchpad.
     
  3. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    Hi, trying to track down receipt number so you can send me the beta of your orientation script. But my transaction doesnt tell me the number, just a payment date and type . I bought it on 30th december 2017, are you able to check records and see that i purchased on that date? Thanks
     
  4. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    They send an email that contains a pdf with it for every order. If you've deleted it you can log into the store, click on your profile and then click on "my orders". That will have a list of all your purchases along with that pdf and invoice number.
     
  5. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    Evening,

    Still loving this, but I seem to run in a bug that only appears in the Oculus Go. I have a prefab that I added to the cube to shoot as a projectile. For some reason in test mode (in unity) everything fires great. As soon as I get into Oculus go the pre-fab looks like it's prematurely exploding.

    I've fixed this once before but it seems to be very intermittent, Any ideas where I might look to try and debug this. I find it odd that the behavior is different in the two systems.

    Great asset btw.
     
  6. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    When you say exploding early is this a particle system? Is the actual trigger from my product occurring at the right timing or if not which script and pointer are you using?

    If it isn't really the trigger but rather particles, the issue is usually with some degree of transparency. Both VR and android (which the go is both) it's very expensive to have somewhat transparent objects especially with the quantity that usually show up in particle systems. Does the framerate dip when you see it explode early?
     
  7. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    Thanks,

    I figured it out again. I think it is related to the particle effects, No the frame-rate is pretty good, it's just a simple flame projectile.
     
  8. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Glad you sorted it out!
     
  9. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    Sorry to bother you but I am staring to Oculus Go develop and I would like to try your beta version? Would it be possible?
    Thanks
    Alejandro
     
    astracat111 likes this.
  10. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If you mean beta version of upcoming updates sure, just email me your invoice number from your purchase.

    If you mean do we have a trial version no we don't.
     
  11. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi greggtwep16
    Sorry for my mistake but I understood that you were offering a beta version to try your unity plugin.
    I do not buy it unitl now but to be honest with you and please I do not want offend you but I had some badly experiences with other unipackages I bought in the Assets Store, for it, for I would prefer try before buy....
    Hope you can understand it
    Thanks for your time
     
  12. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    No worries, to be clear the beta version is for people that have already purchased that wish to try out upcoming features early. I certainly understand doing research before purchasing anything, always better to be safe than sorry, on the asset store that generally means reading the reviews.

    I don't offer trial versions due to the way the asset store works with downloading of source code.
     
    castana1962 likes this.
  13. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    Please do not worry I understand you too
    Best for you !!!
    Alejandro
     
    greggtwep16 likes this.
  14. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    I've been getting ready to move in my own models. I've imported the oculus utilities but it says they aren't there so it won't swap the controller. How can I just swap the model manually? Is there a way to do this thanks. I looked back through the instructions and didn't see this anywhere.

    I'm trying to revert from the "cube" to the standard oculus go model for a few scenes, then swap to another model for the other scenes.

    Thanks in advance
     
  15. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The meshes for the controllers can be found under oculus->vr->meshes. You can use any model you want and just add the pointer you wish to it.
     
  16. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    Thanks. Yeah, the part I missed is the instanced controller script. I've been getting better at this:)
     
  17. voidfeeder

    voidfeeder

    Joined:
    Jul 8, 2018
    Posts:
    6
    It seems that the laser pointer and combo pointer don't work correctly with the UI Slider. Whenever the slider is pressed with the laser pointer the HMD location will change the slider value inverse to what direction you are moving.
     
  18. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Thanks for bringing this to my attention. I was indeed able to reproduce this on my end, and I'll try and get this fixed the next update.
     
  19. voidfeeder

    voidfeeder

    Joined:
    Jul 8, 2018
    Posts:
    6
    After more use with this asset it is really great! It has saved so much of my time and is so understandable to use!!! The custom controllers allow for easy ways to map new control systems.

    I am curious about the best way to access controller + headset rotation and movement in a similar way to custom controllers. I would like to map them to audio controls.

    Thank you so much for your work on this!
     
  20. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    What events would you be looking for based on rotation? Rotation past a certain degree in one of the axis?
     
  21. voidfeeder

    voidfeeder

    Joined:
    Jul 8, 2018
    Posts:
    6
    I am not looking for degree changes, but raw values that I can maybe smooth out to have fine control over audio synthesis.

    There seems to be what I want in the motion diagnostics script, but they output text? I imagine this would be fine to convert to floats and route to audio controls, but wasn't sure if there is a better way with less type conversions.

    This is my first time really getting into Unity/C# and this asset has unlocked so much potential. Thank you!!!
     
  22. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I have just bought this asset.
    Is it possible to get the text input field to work?
     
  23. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The raw values are there when you subscribe to the on_motion callback. For things like smoothing that's probably your best bet.

    My question was more about when you mentioned being like the custom controller components. Those all fire events based on criteria so that you can just add your method in the inspector. For one of those to be added it would require a criteria be defined to trigger an event. For things like smoothing you have to do it every frame anyways, so using the raw values is better.
     
  24. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    What behavior are you seeing when you click on the input field? In editor it should allow you to type with the keyboard, and on device it should bring up the virtual keyboard.

    Certainly let me know which Unity version you are using and which version of the Oculus utilities if this isn't happening.
     
  25. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    Thanks for the quick reply.

    That is what i have expected, but didn't happen.
    The input field just greys a bit when hovering over it.
    I have just added both ordinary and text mesh pro input fields into the UI panel in GuiNavigationExample scene.
    I am using 2018.2.0f2 Unity and oculus utilities downloaded yesterday from oculus site (I can't see the version in the files ).
    I have also created a new project with the asset in 2018.1 and don't see any difference.

    BTW, if it is supported it could be a good idea to place an input field in your demo scene.
     
    Last edited: Jul 21, 2018
  26. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I'll certainly take a look and let you know.
     
  27. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    Thanks in advance.
    Means, you confirm it is not working at the moment, it is not just my fault in using the asset?
    I need to make a configuration panel in my oculus go app.
    If we can't get it to work I would just have to pass the configuration data in the external file.

    BTW I like your asset and it works great - I am using it basically for firing buttons and toggles.
     
    Last edited: Jul 22, 2018
  28. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    No you aren't doing anything wrong. I dug into this today and apparently Oculus has changed their approach with a virtual keyboard. Way back in the beginning of gear vr the normal android keyboard (which is what Unity calls) was able to be distorted for vr so it worked (not the prettiest vr keyboard but functional). It seems somewhere along the way they no longer do this and internally their vr keyboard only plays nice with vr shell type apps (not heavyweight apps like Unity or Unreal).

    So for Gear Vr and Go now this makes text input a bit difficult. The most logical path would be to use a Unity GUI style keyboard and find some way to programatically send keyboard keys, assuming android even allows this. There are a few on the store that claim to do this for desktop vr so I'll spend the next week or so playing with them and see if I can bend them to work on the Go (especially the free ones). If that doesn't work, I'll have to do a lot more investigation.
     
    Last edited: Jul 23, 2018
    tomekkie2 likes this.
  29. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    What is the best way to make a basic fps exploration scene using the character controller?
    I mean in the fpscontroller scene from the asset the fps controller doesn't get blocked by colliders.

    I have tried to remake the UI scene from Oculus Utilities package.
    I have attached the StandardTouchDpadController to OVRPlayerController and placed EasyInputHelper into the scene and I got the OVRPlayerController moving from the touchpad.
    But I got lost when it came to setup the Standard Combo Pointer.
    I have attached it to the CenterEyeAnchor.
    Then it looks like the laser pointer is supposed to stay as sibling within the same hierarchy as Standard Combo Pointer GameObject...
    Finally I just can't get to work the UI Raycast to work on canvass in this scene.
    I would be grateful for any suggestions...
     
    Last edited: Jul 29, 2018
  30. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The fps example and the pointer example show in general how to accomplish this. To answer your questions.

    1. In general for an FPS you put a capsule collider and a rigidbody on your character (with freeze rotation on so it doesn't tip over). This is so if you have stairs or uneven terrain the capsule can climb the obstacles. I can talk about this more if there is a specific question you have.

    2. The combo pointer is essentially both a laser pointer or a gaze pointer based on the last one you touched. Both of those examples used the laser pointer since if you were HMD only it is a bit diffucult to have enough buttons to move around and still do things. Do you actually intend for a full FPS with just the HMD gear VR users? The combo pointer and how to set it up was in the UI example. In general you put it on the camera and in the inspector give it the gameobject for the hand.

    3. When it comes to the Oculus rig on go/gear vr I personally feel it is a bit overkill. It makes sense on Rift but the mobile side doesn't have 6 degrees of freedom and doesn't have 2 tracked hands. My examples generally have a body, a head, and a hand. The gaze pointers go with the head, laser pointers with the hand, etc. The oculus rig has many other objects (left/right/center eye, left/right hand, etc.) For the head, center eye makes most sense, and for the hand you can use either of the hands.

    4. For UI stuff the UI example is best to look at. In general you need to have the Easy Input Module on your event system for the UI, a world space canvas, and the UI must be within the distance you've set in the inspector on the pointer.

    Hope that helps, certainly let me know any other specific questions you have.
     
    tomekkie2 likes this.
  31. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    Thanks a lot. I have just checked and it works perfectly that way.
     
  32. Normark

    Normark

    Joined:
    Jul 25, 2018
    Posts:
    8
    I have seen the very informative documentation on all the pointers and controllers, but, I´m wondering if there are documentation about how to build for the Oculus Go.
     
  33. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Any of the general guides at various spots online go into it in a decent amount of detail. Some of the Gear VR ones are better than the go, the only things that is different is you no longer need signed .osig files to deploy to device for the go. But in general you do the following.

    1. On Oculus website give yourself a company name (allows developer mode to be enabled).
    2. Enable developer mode on the companion app for your go on your phone.
    3. Connect the Go to your PC and allow usb debugging in the popup on device.
    4. You can now build and run or deploy apks like you would on any android device in Unity.
     
  34. Normark

    Normark

    Joined:
    Jul 25, 2018
    Posts:
    8
    Thanks a lot, I dig into this, it seems to be a very userfriendly asset you have made :)
     
  35. Deleted User

    Deleted User

    Guest

    Just found the asset and am considering buying it. I'm running Unity 2018.2.1f1 and have a project also compiling on UWP, Standalone and now will do for Android as well, so I have have a few questions:
    - How easy or hard is it to derive you inputsystem and implement a "single receiver override" feature. By that I mean registering a particular gameobject to the system and only that will receive input as long as its registered (for dragging purposes where the cursor can cross all kinds of other receivers)
    - Besides the necessary gameobjects relevant for camera an controllers that I can load additively from a scene I only add on Android platforms, will the rest of the code properly be stripped on other platforms as not necessary?
    - Is your package available with embedded Assembly Definition Files, or at least has its structure so it's easy to add them in?
     
  36. Normark

    Normark

    Joined:
    Jul 25, 2018
    Posts:
    8
    I ran into the problem, that when i put the Oculus Go in developer mode ( from the Iphone) it will not connect to my PC, it need a USB driver. I can download a driver from the Oculus site, but I´m not shure how to install the driver.
    When I disable the developer mode the PC doesn´t need the driver.
     
  37. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    In general, it looks like you are looking for something crossplatform and would know what platform you are on and only load the needed requirements. My product is specific to the GearVr/Go so it doesn't have anything that would automatically disable itself if on a different platform. There isn't an event to subscribe/unsubscribe it's a normal Unity component on a gameobject, so you'd have to enable/disable the component on other platforms.

    I can't really speak to the quality of the cross platform products on the store as I haven't used them (and they are more expensive). However your usecase might be a better fit for them rather than different products on different platforms and disabling/stripping.
     
  38. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Depending on your OS (windows/mac) this might be required. For myself on windows 10 when plugging in the go it automatically installed the correct adb driver, but they can be found at the below location if your OS version doesn't do it automatically.

    https://developer.oculus.com/downloads/package/oculus-go-adb-drivers/

    Normal android requirements also apply like having ADB installed if you don't already. The normal Unity guides take you through how to do that.
     
  39. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Hello,

    I just tried your marvelous "Easy input for Gear VR and Oculus Go" asset. But I always have the "Oculus Utilities aren't download and imported...) error message even if they are imported. Would it be possible to point me to the right direction to get me started? I am using Unity 2018.2.2f1.

    Thank you for your help!
     
    Last edited: Aug 4, 2018
  40. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Oculus changed their folder structure which is how I detected if it was imported or not. This will be fixed for the new structure in the next update. Currently after you import the Oculus Utilities you can safely hit ignore on the helper window and proceed like normal.
     
  41. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Thanks for the quick reply and info. I have some problem using the demos, it seems like I can't interact with the demo with any of my controllers (mouse, oculus go remote, oculus touch remote) Also, I can't see anything in my oculus rift, even if VR is enabled. The HMD works well in other Unity 2018 projects. Could it be possible that the asset isn't compatible with unity 2018?

    Thanks for the help!
     
  42. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You can interact with them with the keyboard mouse emulation (for instance moving the laser is ctrl + left mouse drag). Full keyboard mouse emulation keys are found in the documentation.

    The product is for the mobile VR side (gear vr/oculus go) not Desktop (oculus rift). If your looking to test your project without having to deploy to the Go for faster iterations you can just use the keyboard/mouse emulation and no HMD is required you can simply hit play in editor. Unity 2018, 2017, and 5.x are all supported.
     
  43. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Thanks again for the quick reply. I was looking to use my oculus go. I am developing for the gear vr and oculus go. but i don't have the Gear VR controller so I thought I could use my oculus go controller and the unity editor.
     
  44. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Regardless of whether using the gear vr controller or go controller, Oculus has made both use non standard bluetooth pairing so they do not connect to PC to use in the editor. Also, unlike Daydream they have not released a mobile app to act as an emulator for the Unity editor. That's basically why I have keyboard/mouse emulation because there isn't another way to get the controllers work on Mac or Windows.
     
  45. Normark

    Normark

    Joined:
    Jul 25, 2018
    Posts:
    8
    Hi
    I have beeing fooling around with the tools in the Easy Input asset, and I seems to have truble with the function of the controller on my Oculus Go, and I wonder a bit more when I see the current release to be from februar 2018, that is around 4 months before the Oculus Go headset was released, are there any updates on its way that speciifik adresse the Oculus Go controller?
    I also would like a bit more dokumentation about how to assign the pointers to objects in the scene, and which pointer/controllers to choce.
     
  46. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    ok I understand now. It's good to know. Just another quick question... Is there a way to select the items in the demos menu with the keyboard or is it only working when testing the .apk built with the Oculus go/Gear VR?

    Thanks again!
     
  47. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Yes this is still very much in active development. There are currently 9 additions being worked on that are currently in beta.

    What issues are you seeing with the Go controller? All is working over here.

    As far as the documentation, if I understand you correctly you want more info on the differences between the laser, gaze, combo, and curved laser pointers correct?
     
  48. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Anything you can do on device you can do in editor.

    So for your example of clicking the menu items with the laser in editor you'd do the following.

    1. Use Ctrl + left mouse drag to point the laser at the menu item you wish.
    2. When the laser is hovering over the menu item press the u key which emulates the trigger press on the controller.
     
  49. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    The "u" key of course. I just realized that the gamepad controller on page 5 of your manual are the keyboard shortcuts.

    Thanks again for your help! On a Sunday on top of that... Really Thanks!
     
    greggtwep16 likes this.
  50. Normark

    Normark

    Joined:
    Jul 25, 2018
    Posts:
    8
    Hi thanks for your reply

    Main problem is that I don´t know where in the hieraci to place the controller, and which object to connect it to, and if any Oculus VR asset should be assigned as well, ned a bit more information about how to assign the pointers, I can´t make the buttons on the controller work after I have build and transferred the app to the Oculus Go headset. The scene opens and I can look around, but the controller doesn´t work.
    Hope you can help me a bit.