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. nk126

    nk126

    Joined:
    Jan 25, 2018
    Posts:
    4
    Hi,

    I'm new to Unity and VR development, so please bear with me! And thanks for what promises to be a very cool product!

    I'm building an app meant to run on both Rift and Gear VR. In one of the scenes, the player has a first person view of a table with a cup on it. They can reach out and grab the cup, lift it up, fake-drink from it, etc.

    The scene works on Rift with the Oculus Touch controllers. I've been trying to port it over to Gear VR using the Gear VR (motion) controller, and bought your product to help. But I can't get even a simple combo pointer to show up the Gear VR version of my scene. The scene builds, loads to mobile, and runs on Gear VR, and everything renders and acts as it should. But no Gear VR controller, laser pointer, or anything else related to easy input gear vr shows up.

    I tried fitting easy input into my existing scene, which uses local avatar with OVRCameraRig, etc (taken from Oculus' downloadable assets). Could not get it to work. I then took all of that avatar and camera stuff out of the scene, and tried to copy your example using just a "Main Camera" and no OVR prefabs. Again, not working.

    Can I send you screenshots of my hierarchy/inspector, or some other info, for help? I'm pretty sure what I want to do is very simple. I just don't have the knowledge to figure it out.

    Also, I saw that folks posted about the documentation, and you released a newer version. That's great! FWIW, I still find the documentation to be lacking - it'd be great if there was a step-by-step tutorial for building a very simple new scene from scratch that uses Easy Input. I know you may not have time for that. But for beginners, especially, being able to follow instructions can be much easier/better/faster than trying to make sense of an already-built example.

    Thanks so much!!!
     
    clewis75 likes this.
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Could be 2 things.

    1. Depending on your version of Unity and Oculus utilities there was a bug where the controller didn't show up unless you were pressing the trigger. The latest Oculus utilities release notes did list that they've finally fixed it but I haven't tested yet and they've said that before with no success. At least there aware and keep trying to fix the issue. In the meantime this workaround will work on any Unity/Oculus Utility version.

    https://forums.oculusvr.com/develop...not-working-as-expected-with-unity-2017-2-0f3

    2. I will say having played around with the controller for awhile it does like to go to sleep when you take the hmd off. I usually find it prudent while the apk is being sent wirelessly to the gear vr put on the HMD on oculus home and make sure the controller hasn't gone to sleep

    You certainly can send me any screenshots or other info if you want, my money will be on one of those two though especially if the examples aren't showing the controller.

    I can certainly expand on the Fresh scene from scratch section below.

    http://ladmertech.com/wp-content/uploads/2017/12/Easy-Input-for-Gear-VR-Documentation.pdf

    What in general would you like expanded on there? The steps outlined are the base and then from that point on it depends on the scene (ie. add a look dpad to your character if you want that control scheme, or a laser pointer, teleport receiver, etc.). Every scene is different on what it needs but certainly let me know what you would like at a high level to be added there and I'll do so.
     
  3. nk126

    nk126

    Joined:
    Jan 25, 2018
    Posts:
    4
    First off, wow what a quick reply! Thank you so much.

    So you know, the documentation that came with the download from Unity Asset Store is different (older?) than what you linked to here. The documentation I got does not have the Fresh Scene from Scratch section. When I looked at the updated documentation mentioned earlier in this thread, it looked very similar to what I had, so I only skimmed it and may have missed Fresh Scene in there.

    At any rate, you may want to update the documentation that comes with the downloadable asset.

    I'm going to try your workaround suggestions and then post again.
    /Cheers
     
  4. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The included documentation is in an updated package, it just hasn't hit the store yet (going through Unity review right now). The update also has an improved grab receiver and other additions. Certainly let me know if one of those two resolved your issues.
     
  5. nk126

    nk126

    Joined:
    Jan 25, 2018
    Posts:
    4
    Unfortunately, my issues persist. I'm 99% sure it's something I'm doing wrong, and not any sort of bug! :)

    I implemented the workaround to OVRInput.cs and also made sure that my motion controller is connected and not going to sleep. Didn't fix or otherwise change anything.

    The controller is not showing up when I preview the scene in Unity, either. Just to be sure, I verified that the preview works with your example scenes, and it does.

    Here's what I'm working on (see attached). At this point, I just want the motion controller to show up, and then be used to grab the cup sitting on the table (I added a grab receiver to the cup). Once that functionality is working, I'd want to replace the graphic of the motion controller with a graphic of a hand. But it's very straightforward functionality, and no moving parts to worry about in the scene.

    Like I said, pretty sure I'm doing something wrong - maybe even just missing a simple/obvious step. Help? Thank you!
    easyinput3.PNG

    easyinput1.PNG easyinput2.PNG
     
  6. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Glancing at it quickly it looks like you have the laser pointer directly on the camera, not on the object you want to be your hand, controller prefab, or whichever object you want to be moving around. I should definitely expand on this in the documentation because the pointers are different.

    laser pointer- is going to be your controller and representing the hand, gun, or whatever virtual object that will correspond to the controller. Oculus does report it's position relative to the HMD so you don't need to offset it from the camera in the editor (and for my emulator in the editor you can specify it manually). There is also a height offset in the inspector if you want to simulate a taller or smaller person, or have a giant mech or something else.

    gaze pointer- is going to be your head and should be attached to your head or directly to the camera if you aren't using a rig.

    combo pointer- same comments apply above since it's both based on which you've touched last but the inspector will have spots for you to drag your object for the laser pointer and hmd.

    The version is going through review also has a much better grab receiver when you get to that point. Send our support email address your invoice number and I'd be happy to send it to you right away since it's not on the store yet.
     
    Last edited: Feb 1, 2018
  7. nk126

    nk126

    Joined:
    Jan 25, 2018
    Posts:
    4
    I'll send you my info for that update. Thanks!

    Okay, progress! Thank you. I added a GearVR controller prefab as a child of my camera. The controller shows up in preview and I can rotate it around using emulation mode, though I can't actually move the controller's position in space.

    When I build to my phone, the controller shows up but only at the bottom edge of my view, and only if I'm looking to the left. And while my motion is tracked, the tracking is wacky - rotating my wrist causes the onscreen controller to both rotate and move in a big circle.

    I tried to offset the position of the controller relative to to the camera, but it didn't help.

    Any ideas?

    easyinput4.PNG
     
  8. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    From your description it sounds like you're expecting 3DOF on Gear VR to be like 6DOF on Rift which is not the same thing. What Oculus actually does (regardless of whether you use my product or not) is track orientation only and then fake minimal movement via normal human IK (they simulate an arm and an elbow). You can see this in Oculus Home on device just as well. If you move your arm things more or less feel correct unless you are especially tall or small, far from average and even then it's close enough. If however you move your wrist but keep your arm steady you will notice the disconnect where the controller is moving and your arm in real life isn't. This is because they are simulating that position based solely on orientation and then simulating what that must mean for position based on an average persons arm. So in effect they are faking a bit of position from 3 degrees of freedom and running it through an IK simulation. Because it's 3 DOF naturally keeping the orientation the same and strafing the remote also shows no movement because the orientation did not change and that's all they are using.

    This is the same for all current mobile platforms (Gear VR, daydream, soon to be Oculus Go, etc.). Eventually we'll probably see a 6DOF controller on the mobile side similar to what Windows MR uses on the PC side, but none of those are available yet.

    As far as the editor emulation with the keyboard goes, Oculus doesn't provide access to their IK simulation on the PC side so while the orientation is similar, that movement does not occur. Generally in editor you are just prototyping grabbing, moving, etc. anyways so you don't have to wait for the build time to device so it should be adequate. I really wish that Oculus provided an App like Google did with Daydream to simulate the controller on PC but they did not, so it's really as close as I could get. I've used it quite a bit though and it did speed things up and I could do every aiming I wanted so it should help even though it's slightly not apples to apples on device. If you need anything added to the emulation let me know.

    The location of the controller on device is determined on whether you picked left or right handed when you setup your gear vr controller. The editor assumes right handed and then ctrl-drag reorients (full editor emulation is in the documentation) but I can certainly expose an option if required for left handed as well.

    This is what I gather from your latest post, but if you meant that the tracking in project is way different than Oculus home for the same movements let me know, it should be the same with the faked IK that they provide.
     
    Last edited: Feb 2, 2018
  9. CAwesome

    CAwesome

    Joined:
    Nov 28, 2014
    Posts:
    5
    Hey,
    Interested in buying your package and was wondering if it has Swipe detection for both HMD touchpad and Controller trackpad?

    Regards,
    CA
     
  10. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There are only a couple of prebuilt components that operate on swipes in Easy Input.

    The first is the standardTouchpadController which allows for position, rotation, and scaling based on swipes. You can set which axis you want the horizontal and vertical to effect. I can't say that it's very popular though most elect to use some of our other prebuilt controls.

    The second is the customTouchController which allows you to set functions to call based on the any of the touch events that Easy Input creates (touchbegin, double touch, long touch, swipe, etc). We have an inspector variable exposed for how long you want a swipe to be and then any drag over that length will fire either an up, down, left, or right swipe when that action is performed. You simply point it to a function of yours you want to be called when that happens.

    Swipes do work on both HMD and controller trackpad. I will say that in general I find the HMD one awkward to use, especially on the HMD models with the grooves, but it does increase your audience size. A few years ago most games chose this path, but a lot more are requiring the gear vr controller nowadays.
     
  11. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
  12. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I can't say I have that asset. In general our input module just uses a normal graphics raycaster from either the controller or the HMD depending on whether your using the gear vr controller or not. I would have expected it to work with it but it really depends on how they are doing the effect. If they are using there own event system and a shader distortion I guess it's possible that it wouldn't work or be off by the distortion amount but it really depends on the implementation.

    It's hard for me to say without it, but are you seeing no interaction at all, or is the buttons off by a bit on selection? Also, are you using our input module on the UI?
     
  13. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Hi,

    Just bought this. Is there an easy way to test whether an object is currently being grabbed? It would be great if you had the ability to send unity events based on when an object is grabbed/released, or on teleport etc.

    Kindest,
    Mark
     
  14. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There aren't currently Unity events sent for OnGrab(), OnRelease() but that's a good idea I'll make sure to add it for the next version. The version on the store there is only a variable in the grab receiver that has whether the item is grabbed or not. I'll make sure to expose this via Unity Events going forward.
     
  15. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Legend, thanks.
     
    greggtwep16 likes this.
  16. eovento

    eovento

    Joined:
    Feb 22, 2018
    Posts:
    38
    Good evening,
    First of all, thank you very much for this elegant solution for the Gear VR!

    I don't have the Gear VR Controller, only the HMD, and I'm using the asset for the very first time.

    I'm really happy already just for seeing my Gear VR recognizing the build and running it! ;)
    The package looks awesome, but I'm facing a few troubles:

    -While running MasterExample, the "Back" button on the HMD doesn't work, so I have to take the phone out and put it back on the device in order to load each different example scene.

    -On the FPS example, initially it moves perfectly - sliding towards the touchpad moves forward, sliding it back, move backwards. But if I turn 180 degrees and face the opposite direction, it will not track my facing direction and keep the old coordinates for the control - so sliding forward will now walk backwards and sliding back will now move forward, which is no good.

    -The Pointer Types scene doesn't work at all on the HMD (maybe it works only with the controller?). I can't even click/tap on any of the given options. Had to unmount the phone and put it back again, as the "Back" button does not work on HMD.

    I wonder if I am not doing something, or doing something wrong... or if with the Gear VR Controller these behaviours are different.

    The GUI is amazing!!! Thank you very much for the included example.

    Thank you in advance, and wish you a good weekend,
    Daniel Ribeiro

    P.S. -> Surprisingly, on the Pointer Types Scene, if I walk around it works properly in all directions and orientations! The locomotion "bug" I described is present only on the FPS Example.
     
  17. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Which version of the HMD do you have? It should work on all that had two buttons (home and back). The very first version only had one button that was supposed to be back but because it was only one they later made it function more like home. On that version (the 2015 white HMD) it may not work). I'll dig out my old headset and mess with it again as it's been a long time since I've played with that one because it had a smaller FOV and they newer ones were so cheap.

    The FPS example used a control scheme that most non VR FPS's used in that you manually had to turn the character (default is trigger and click). With HMD only this scheme doesn't work very well because you don't even have two buttons to use. If you're HMD only, the control scheme on the pointer example will work better for movement (see notes below for running that scene HMD only)

    Yeah I should make this scene more friendly for HMD only and have it default to the gaze pointer if it detects no gear vr controller. Until I push out an update, you can simply in the inspector uncheck the laser pointer as active and check the gaze pointer as active when the scene starts. Then you should be able to move around and grab. I wouldn't click on the laser pointer or curved pointer though, those assume you are using the hand controller which you don't have.

    The pointer example and others were added recently and I should have gone through them HMD only more carefully before posting. I'll get that out with the next update.
     
  18. MotrinIB

    MotrinIB

    Joined:
    May 30, 2017
    Posts:
    2
    Loving this asset. So much simpler to work with compared to Cardboard.

    My only question is how do I throttle the max movement speed using dpad look?
     
  19. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Simply adjust the sensitivity value in the inspector. Default is 1, if you want it slower set it to .5, .25, or what makes sense for your game. If you want it faster you set it to 2, 4, or another value.
     
  20. CodePelican

    CodePelican

    Joined:
    Mar 9, 2018
    Posts:
    1
    Hello, I have been thoroughly enjoying this asset! The documentation is helpful but some video tutorials would be a terrific resource. I am curious if you have considered adding some visualization support for precise finger tracking on the touchpad? Think Samsung's VR Internet Browser. You can see a small node track you finger as it glides on the touchpad. Even better would be a tutorial that teaches us how to extend your asset to obtain this feature. I would rather have to work through a tutorial than just be handed the feature. Learning more on how your asset works would be the greatest addition for me. Definitely would help conquer another one of the daunting learning curves in VR development. Hope this has been helpful feedback and I appreciate the great work! Thanks!
     
  21. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Thanks for the feedback! Video tutorials are definitely on my to do list. As far the touchpad that's a good idea. I'm surprised that it isn't in the Oculus SDK by default like Steam VR has for the Vive. Should be doable, the coordinates are already given in a -1 to 1 range so overlaying an icon (probably just a small circle or sphere) and moving it at the appropriate scale from the middle of the touchpad on the model should do what you ask. I'll try and get this incorporated in the next update along with all the previous requests.
     
  22. WOOSUK-LEE

    WOOSUK-LEE

    Joined:
    Apr 23, 2018
    Posts:
    3
    I bought a Easy Input for Gear VR and Oculus Go asset from the Asset Store.

    Unfortunately, I made a payment with a different card than the one I was trying to purchase because I made a mistake during the purchase process.

    Therefore, we will request a refund for the original card purchase. Please refund for the purpose of changing the credit card to use for the purchase, not the refund of the simple remorse.


    Thank you.
     
    Last edited: Apr 27, 2018
  23. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I replied to your email with the unity address to email for a refund. On cases where it's payment related and if the item has not been downloaded already, they automatically refund.

    Just an FYI you probably want to remove your email and order number from your post since these are public forums.
     
    Last edited: Apr 27, 2018
  24. WOOSUK-LEE

    WOOSUK-LEE

    Joined:
    Apr 23, 2018
    Posts:
    3

    Thank you for quick response. We are in the process of refunding with Unity Support.
     
    greggtwep16 likes this.
  25. J0linar

    J0linar

    Joined:
    Dec 12, 2013
    Posts:
    83
    @greggtwep16
    Hey there am a Bit struggling with getting a toggle for the FirstPersonTurnAnShoot.cs example...
    I just cant wrap my Head around it :/,
    any Pointers on how to toggle the turning on/off by doubleclick of the GearVRTrigger Button?
    Any help would be appreciated:)
     
  26. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That particular code file was just an all in one that was used in the fps example. It used clicks and double clicks to shoot so that basically any click of the trigger initiated a shot. It was also an example of a code file manually subscribing to our callbacks if you didn't want to use are more general purpose components. It also was pretty specific at spawning a gameobject for the shot.

    If your trying to do a toggle on the trigger double click I'd really recommend using the customButtonClickController instead. Simply call your toggle by adding it to the inspector slot for on double click end.

    If I'm misunderstanding something certainly let me know.
     
  27. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    Hi, apologies if these are covered already. I am making a space shooter type game so purchased the software to take advantage of your first person script that instatiates a bullet and applies force.

    I am struggling to create a 'rapid fire' function, so when i hold down the trigger , it instatiates a number of bullets based on a fire rate.

    Also. Rather than having a line render, id like to have a crosshair instead to track the raycast from the controller

    Any tips or pointers (no pun intended) would be greatly appreciated

    Thanks
     
  28. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The OnClick event (not OnClickEnd or OnClickStart) will fire every frame that the button is depressed so in general if you want rapid fire shooting I would use that. I'd recommend to use the CustomButtonClickController. This is going to fire every frame (60 times a second on the Gear VR and 72 times a second on the Go) so if you don't want quite that many bullets the buttonClick object that is passed contains the timestamp it was first pressed. Based on that you could certainly do any rate of fire that you want. Certainly let me know if you need more details.

    All of the included pointers (laser, gaze, etc.) have slots for both a laser and a reticle. So if you want just a cross hair turn the laser off and populate the reticle slot with your graphic for the cross hair. The examples just used a sphere for the reticle but you can certainly use anything you want. You can scale it and place it whatever distance you want away from the laser or HMD that you want.
     
  29. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    Hello,

    I just purchased this to work on some Oculus Go items. I opened up a sample scene and am attempting to build the scene out just to see how it all works. The error I'm getting I can't seem to get around.


    Assets/Easy Input for Gear VR/Scripts/Core/EasyInputHelper.cs(296,36): error CS0103: The name `OVRInput' does not exist in the current context.


    Looks like the OVR plugin update didn't want to work, its working now.
     
    Last edited: May 18, 2018
  30. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Glad you figured it out. When you import Easy Input it pops up a window with the items you need to do (like download Oculus Utilities). If you click the link it will take you to what you need in your project.
     
  31. imaginethepoet

    imaginethepoet

    Joined:
    Aug 23, 2016
    Posts:
    44
    I still am having an issue though trying to get the Oculus GO controller show up. I tried the method in the documentation, but it says I haven't imported the Oculus utilities. I have done this though awhile ago. I was trying to just swap it out myself, but I still see the boxy model.

    Thanks for the quick replies!
     
  32. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The recently updated Oculus Utilities changed their folder structure which is how I detected if you successfully imported and how I copied over the controller prefab. I'll be getting an update out if a few days. In the meantime though you can safely click ignore on the window that asks you to import Oculus Utilities and you can drag the controller prefab into your scene straight from the Oculus Utilities.
     
  33. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    Hi



    I wonder if you can help, I am struggling to create the right sort of control mapping for my game, I have been successful in using the combi-pointer script to interact with my initial menu screen and then I use your first-person shooter script to fire projectiles within my the main scene of my game, however, when my game over screen Is activated, i am unable to select the buttons on the menu, I have determined it is because the first-person shooter scripts doesn’t have this raycast facility to interact with the buttons. I need to combine the different functionalities in a way to create a single controller script, but I am struggling to achieve this after hours of working through your examples .



    I have a desired config that Is below. Any help in achieving this would be greatly appreciated. I think this sort of config could work in a shooting gallery/timecrisis type game where the player movement is static or predetermined by waypoints, so potentially hold merit as a possible custom script for a future update? :) ..



    GearVr Controller



    Trigger – Firing selected weapon

    Swipe Left : Switch Weapon – (assuming this would be done via a call method facility)

    Swipe Right : Switch Weapon +

    Touchpad Press – Activate buttons on menus and navigation



    I have been thinking about how this would be achieved and potential issues.



    Switching weapons - : each weapon would have a different recticle / and projectile prefab. Would I need a separate laser script for each weapon?



    I am currently working through changing weapons in a separate tutorial, so it may become more clear but there are ZERO tutorials on weapons for the GearVR controller using the laser pointer. So I will be adapting my weapon change script from a standard game.



    I am new to coding , but I have already achieved so much in such a little time. I am determined to get this functionality into my game and would really appreciate your help

    Thank you

    John
     
  34. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Hi John,

    If you've added a UI to a scene based on the FPS example, you'll notice that the combo pointer there did not have UI raycast checked and did not have a Easy Input Module on the Event System used by the UI (because it had no uGUI on that scene). If you add those two things your game over UI will be intractable.

    Your overall control scheme seems find to me, most control schemes are dependent on the game first and foremost. As far as weapons needing different reticles, you don't necessarily need different pointers you could certainly swap them out in code at runtime, but that being said probably everything about the pointer will be different (model for the gun, length of laser sight, reticle shape, etc. so it would probably be best to have a separate pointer for each and then just enable disable them when you want to switch like my pointer example does.

    That pointer example is probably your best thing to look at. It switched between pointer types (laser, curved, gaze) but I would think for switching weapons you'd want to do the same. The only difference is instead of clicking on the UI to switch it sounds like you want the switch to happen with swiple left/right.
     
    JohnGerard likes this.
  35. steveR

    steveR

    Joined:
    Jul 14, 2013
    Posts:
    33
    I am interested in developing for the Oculus Go, with your asset. Can I use a Mac for development and playing on the GO. And if so can anyone point to maybe a setup guide or tutorial.
     
  36. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There isn't anything special you need when on Mac OSX. Really any PC windows or mac is perfectly fine to deploy to any android device (which the Go is based on android). I can't say I've seen any specific guides for the Go from Oculus yet, but it's basically the same as Gear VR which there are numerous guides. The only real differences from Gear VR are as follows.

    1. You must turn developer mode on the companion app on to be able to deploy to the Go
    2. .osig files which were required for Gear VR are no longer required on Oculus Go so you can skip that part of the guides.

    Like with any android based device you can either build and run from the editor, or you can install the .apk via ADB from your PC.
     
    Martin_H likes this.
  37. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    Thanks so much for your help, that fixed it ! There was also a scaling issue on my game over ui too which i spotted after seeing the laser in the scene view when unity is in play mode.

    I have adapted your switching pointer script so i can switch between different lasers pointers.

    Thanks so much for your help and support.

    Q- I am however struggling to find swipe right and swipe left in the controller mapping to call in the weapon switching script :(
     
  38. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You'd use the CustomTouchInputController. In there there is an onSwipe event that you can add your function to.

    In the inputTouch object that's passed query touch.swipetype which will let you know if it's left/right/up/down swipe.
     
  39. clewis75

    clewis75

    Joined:
    Nov 17, 2017
    Posts:
    1
    Yes that would be great! Have uou gotten any headway on this?
     
  40. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Definitely will at some point. I currently have 2 feature adds in the pipeline (orientation based controller (flight stick) and teleport zones) as well as bugfixes. When all that is complete I'll certainly make some videos.
     
  41. Ew0k

    Ew0k

    Joined:
    Jun 25, 2017
    Posts:
    10
    Hi Gregg, I purchased Easy Input Gear VR and Oculus Go and it's amazing :) I spent a whole week by myself since trying to get laser pointer, teleportation, grabbing and UI interaction to work using the Oculus blog examples with little success. So I purchased this asset from you and within 10 min I managed to do all of the above with ease, so thank you very much indeed! :)

    I wanted to ask you if you recommend to set up the Camera for Gear VR / Oculus Go using just a standard Unity camera the way you use in your scene examples, or if it's better to use the OVRCameraRig? It seems I don't really need to use OVRCameraRig anymore since Easy Input Gear VR works fine with the camera.

    Cheers,
    Hendrik
     
  42. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There isn't anything magical about the OVRCameraRig. The main reason I don't use it in the example is because for Gear VR/ Oculus Go it's a bit overkill and more represents a rift setup. The Go essentially has the HMD and one controller that represents one of the hands so the rig I use has a body, head, and hand and that's it. Their camera rig I believe has head, center eye anchor, left eye anchor, right eye anchor, left hand anchor, left controller anchor, right hand anchor, and right controller anchor.

    If your game actually uses all that then you can certainly keep it but most especially on the Go won't so I'd probably not overcomplicates things. If you mess with scale by adjusting the IPD you can keep left and right eye but if you don't I'd ditch that for one object where the camera is set to both eyes. The hands also I feel are overkill since you can only have one controller and you pick left and right. Having both tends to confuse things as well I like having one because on Go you select your handedness outside of your game and you don't know ahead of time if it's left or right so just labeling it hand makes sense to me. It automatically switches position based on what you selected.

    In the end it's up to you and what you need, either way will work.
     
  43. Ew0k

    Ew0k

    Joined:
    Jun 25, 2017
    Posts:
    10
    Awesome thanks for the info :)
     
  44. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    Further thought on this, the value determined in 'min long tap time' on the easy input helper, could i change that to 99999 so it never moves to the long press call method? The gear vr controller has so much functionality, im struggling to get the right config for my game.

    I just want the player to hold left on dpad to strafe left and hold right to strafe right, etc etc
     
  45. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    It depends on which ideal control scheme you think would be best for your space shooter. If you want it to be the dpad you can certainly use the standard dpad controller like you are. It sounds like you want up/down to rotate but not left/right. You can set the vertical and horizontal separately and even set one of them to none if you only want one of the directions to control. If you wanted one direction to effect position and the other rotation you could even have 2 of them on the same object one with localrotation and the other with localposition and just have the other axis set to none. That being said I'm currently working on an orientation based controller (kind of like a flight stick) that might work better, if your interested email our support email address with your invoice number and I'll send you the current beta version.

    You certainly could do that but that would render long presses unusable anywhere in your game. To have an action occurring on long press there usually has to be a script or something else purposely doing an action on long press (like the turning in the fps example). In general it's best to just remove those components.
     
  46. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    So if you want up/down to move forward back on current trajectory (towards waypoint) you'd set the vertical to be the z axis on local position. Since you don't want left/right you'd set that to none (wasn't clear if this mode was all the time or not). For when you have confined roaming (not enabled all the time?) It sounds like you'd want it on local position again although this time with horizontal as x axis and vertical as y axis. The confinement itself would be outside of this and either be objects with colliders keeping you in, or a simple script you create that doesn't allow the position to get out of your bounds.

    If instead you wanted all 3 at the same time another control has to come into play because you want 3 axis of control and a dpad only has 2 axis. So something like the tilting forward/back combined with the touchpad would give you up to 4 axis of control.
     
  47. jokers27

    jokers27

    Joined:
    Apr 20, 2018
    Posts:
    3
    Hi, im considering buying this asset but before i have a couple of question.

    All i need is a fps controller with a target circle in the middle appearing when the player look at door or any interactive gameobject. And working for both people with controller or only for those with the headset button without any modification of me.

    Do you include a prefab allowing to do this?
    Does this asset work in unity 2018.1.1f1 and updated sdk without any modification?
    Is there a trial version possible?
     
  48. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There is various included scripts in the product that do what you describe.

    1. There are 2 fps type controllers in the product. One that moves in the direction you are looking, and one that is more like you'd have on desktop that uses long clicks for turning
    2. Target circles or reticles can be attached to any of our pointers (laser, gaze, or combo). These can be any gameobject with any artwork you provide.
    3. Disappearing/reappearing the reticle on hovering an object within range there are scripts provided (StandardPointerReceiver). These work off physics raycasts so will need a collider.

    Most of what you describe, won't require any modification, perhaps some miscellaneous stuff here and there like adding colliders to your door or interactive objects. Things like custom actions (jumping, opening door, etc.) will almost always require some small functions to code on your part, even if it's just to play an animation, but the big things like the pointers, movement, etc. won't require modification.

    There is no trial version due to the way Unity physically downloads source code.

    Hope that answers your questions.
     
    jokers27 likes this.
  49. jokers27

    jokers27

    Joined:
    Apr 20, 2018
    Posts:
    3
    Yes except 1, "Does this asset work in unity 2018.1.1f1 and updated sdk without any modification?"

    And for the fps controller you are talking about, does it move as long any button is down? And work for both player using controller button or "headset button only" by detecting the type of input automatically?
     
  50. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    2018.1.1 works fine. The latest Oculus Utilities runtime also is fine with the caveat that they have recently changed the folder structure which is how I detected that the utilities were successfully updated on my setup wizard. I'll be pushing a fix in the next update but in the meantime you can just click ignore in the wizard after you've successfully imported.

    The look dpad moves in the direction you are looking as long as you are touching the dpad. This works regardless of whether it's HMD only or using the motion controller (the pointer example showcases this control scheme). One thing to note when you target the old gear vr hmd only configuration though is that dpad is swipe based only. Oculus did this because with a headset on you can't actually easily tell where on the pad you are touching so no matter where you touch first it's 0,0 and then the values populate as you swipe. So to move forward you actually swipe forward. The motion controller isn't like this if you touch the top right of the pad first it's reported as 1,1 like you'd expect from any other touchpad. Both work fine though with their respective ways they function. This is becoming less of an issue as Go always has a motion controller and as many Gear VR users now having the motion controller, but the functionality is there for those that don't.

    The other scheme that's less popular where the long press of trigger or the pad rotated you only exists for the motion controller (this is in the fps example). The HMD only configuration actually has basically no clickable buttons for you to use. The HMD home button wasn't on all versions of the headset and the ones that do have it Oculus reserves its use. The back button on the HMD long press is also reserved, you can use the back button quick press but to get approved on the store Oculus mandates that it be used for pausing/go to previous menu/exiting so it's not really a general purpose button. The games that were published during this era without the motion controller essentially used swipes and touches and interpreted them as buttons.