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

Easy Input for Gear VR and Oculus Go [Released]

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

  1. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There isn't anything special there in a new scene or the examples. If you're orientation is off, most likely it's not aligned with either the character if you're using one, or the camera if you're not. So modifying the start conditions to get them aligned in editor will fix the orientation.
     
  2. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    Check this out:

    The direction of the Camera

    Direction of the CUBE Pointer

    After you hit PLAY it changes direction completely
     
  3. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Do you by any chance have the instancecontroller script on it (shouldn't if you are just using it with the cube and not the controller prefab)? I'm assuming you do because that's the only thing that flips orientation (it flips it because oculus's prefab is not straight ahead).

    If you don't let me know which scripts you are using on it (laser pointer, combo, etc.).
     
  4. phattanapon

    phattanapon

    Joined:
    Jul 21, 2014
    Posts:
    10
    Can I read accelero/gyro data from Oculus Go controller? Or any other data from the controller that would allow the following idea to work.

    I have an idea for a virtual jogging experience for elder. They might attach a GO controller to their feet, sit on a chair, then start walking in the virtual scene (3D or 360 videos) ( the action is somewhat like the Cybershoes here )



    I would like to know if it's possible with the help of this asset? Thank you.
     
    castana1962 likes this.
  5. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You can read all of which Oculus exposes. Orientation (sensor fusion), angular velocity (gyro),
    and acceleration (accelerometer) is what's exposed. There would still be a decent amount of work on your part to detect the steps. An asset like vr step if it's compatible with the go might be a better fit.
     
  6. ubergeekseven

    ubergeekseven

    Joined:
    Oct 27, 2014
    Posts:
    5
    I am having an issue with rotational alignment. I have tried a bunch of things to get it working exactly how I see with other go applications. i based my setup off of the fps example. My character does not move though, other than rotation. I have it working almost 100% with a capsule as the parent, camera and controller as siblings. When rotating to about 180, the controller comes closer to the camera and sticks in that closer position until you look to the right for a second. Then it corrects until you turn more in the same original direction. The controller is the parent of a piece of paper that floats slightly above and in front of the controller.
    At first I thought something was offset a little, but the origins are all at 0,0,0 other than the main parent that is the capsule. It is in a different world position. that should not be the issue though.
    Other than that 1 thing, this asset has saved me so much time.
     
  7. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Generally speaking, the controller (hand) and camera (head) should be children of the capsule (body). Having them as siblings will lead to alignment issues.

    If in your description you meant you already have it like that can you post or send me a screenshot of both your hierarchy and the inspector of the laser pointer you are using.
     
  8. ubergeekseven

    ubergeekseven

    Joined:
    Oct 27, 2014
    Posts:
    5
    I swear that every time you answer back, I figure something out right before. After playing with the home screen in the oculus go, I realized that it does the same thing in there too. It looks a little smoother, but still the same. If you turn left, the controller comes towards you until you stop. Even then, it does not go back to where it should. Not until you look to the right. It may be the opposite when set up for the left hand. So, not anything to do with your asset, or my setup. i do have it in the correct layout, maybe I used the wrong terminology in describing the sibling. but, it is set up in the way you describe.

    thanks for the help.
     
  9. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I think what you are describing is the IK solution that Oculus uses to get position based on orientation only. Generally speaking if the controller and the head are in the same position before and after your movement it should be the same. However if the orientation is different the position of the controller will be different because IK is going to solve for a fake shoulder, elbow, and hand in a different way based on the now different telemetry.

    The main thing that usually takes some getting used to is it's only the orientation that matters not the real world position of your hand.
     
  10. danieladominguezcoll

    danieladominguezcoll

    Joined:
    Sep 27, 2018
    Posts:
    5
    Hi there. I recently bought your asset and first off, THANK YOU. It has saved me a lot of time. I'm currently developing a VR app in Unity for my undergraduate dissertation and had a couple of questions...
    1. Is there a way I can change de acceleration or velocity of the movement? I can move using de Gear VR controller's d-pad (or touchpad) but it moves too fast and causes dizziness.
    2. Is there a way that I can move by only clicking the d-pad? It moves when I click it but also when I just touch it.

    Finally... the environment I'm developing is a bit space-like and the movement would be in first person. So, I'm trying to make the player move freely, not only horizontally, as if the user were "floating" and the movement could be omnidirectional. Is that possible?

    Thank you again for your work!
     
    Last edited: Nov 4, 2018
  11. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    1.There sensitivity multiplier in the inspector that you can raise or lower. Which specific component are you using?

    2. There is an inspector item that you can change from "always" to "only when clicking".

    3. I have something like this in beta for another user. Email our support address with your invoice number and I can send it to you. Basically you can move in all 3 dimensions then with forward/back on the dpad. Strafing is removed for this though since when not looking straight ahead this will cause motion sickness.
     
  12. danieladominguezcoll

    danieladominguezcoll

    Joined:
    Sep 27, 2018
    Posts:
    5
    Thank you!
    The sensitivity multiplier worked. I was looking for the "only when clicking" option but it only show "Only when NOT clicking" so now it moves when I touch the Dpad, not when clicking it. Any ideas?

    I'll send my invoice number, thank you for your time!
     
  13. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Which specific component (Dpad) are you using?
     
  14. danieladominguezcoll

    danieladominguezcoll

    Joined:
    Sep 27, 2018
    Posts:
    5
    "Standard Look D-Pad Controller" script.
     
  15. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You are correct, I flipped this at some point and accidentally left out the only when clicking mode. I'll certainly get this added back this week.
     
    Last edited: Nov 5, 2018
  16. eovento

    eovento

    Joined:
    Feb 22, 2018
    Posts:
    38
    Good evening, Greg! How are you?

    I wonder if it's possible to move towards the direction the controller is pointing, and not the direction the Camera is facing. It became my preferable locomotion setting for future projects as I want users to be able to look aside (or anywhere) while walking forward (or anywhere the controller is pointing). If an update is not possible, would you please orient me on what would I need to change on the script in order to achieve this? I tried by myself, but I assume it might consist on a change in multiple scripts, so decided to consult you first.

    I've been reading about additions to the asset in other's posts answers. Even to myself a while ago. And I wonder if I am missing something... as you are clearly very present here and very supportive, always helping everyone in your forum, but the asset on the store hasn't been updated for 8 months. So I wonder if there is a GitHub repo, or anywhere I'm not aware of, from which we can access the current version or if, indeed, nothing got deployed in this time.

    Thank you!
    Daniel Ribeiro
     
  17. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I can certainly make a control to do that, If you keep the horizon flat (locked) I believe it wouldn't cause motion sickness do you want that in it as well?

    I manage the betas directly with each party. There are quite a few additions in there and the volume had made it so that the documentation for the additions never quite got complete before the next request came in, which is fine for the beta but not for general release. You are correct though it's been long enough I need to bite the bullet and spend a week and get the docs done so it gets to the store.
     
  18. Arsandis

    Arsandis

    Joined:
    Sep 25, 2018
    Posts:
    20
    Hey,
    I want to build an app, where the player controller moves by pointing the ray from the controller at a point on the ground and pressing the touchpad button and then the controller moves there. Also I want to grab an object at the end of he ray's position by pressing the trigger button and then moving it up,down,left,right by moving the controller and moving it forward and backwards by swiping on the touchpad.
    Will it be possible to do, especially the forward and backward movement part?

    Thanks!
     
  19. danieladominguezcoll

    danieladominguezcoll

    Joined:
    Sep 27, 2018
    Posts:
    5
    I think the first part you're talking about is Teleport, which is in an example scene in his asset called PointerExample
     
  20. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Both of those are in the product. The first is just as you describe (you can pick what button you want for teleport).

    The second those features are in there but slightly different than you describe but the functionality is there. That design was agreed upon with various beta testers that requested it. Everyone wanted something slightly different but this was the only comfortable scheme that actually enabled them all at the same time.

    The component for the second is called the grab receiver. With it you can pick up things, throw them, rotate them, move them, etc.

    For the actual grab with your pointer you can select which button you want to use including trigger. You can also select how you want the object to behave when you let go whether throw, drop, etc. Movement of the object is moving the laser around for up/down/left right and for depth its clicking either up or down on the touchpad. Rotation is done with touchpad swipes for the main two axis and is done with twisting the controller for the last axis. All of these are options that can be turned off for instance if you want movement and not rotation, but all can be enabled if you want them all.
     
  21. henryrat

    henryrat

    Joined:
    Dec 26, 2016
    Posts:
    1
    Hey there, loving this asset thanks for making it, it's saved me so much time porting my google VR project to Oculus devices. I'm just wondering about the timed gaze that has been mentioned, I can't see anything obvious in the assets or scripts but just wanted to check before I set this up myself?

    Cheers.
     
  22. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    This isn't in the version on the store yet, since it was requested as part of the latest beta cycle. I hope to have it ready to submit this week (mostly documentation that has to be written left to do). This means after Unity review it might hit the store within 3 weeks.
     
  23. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The update was submitted today, so you should see it on the store when approved by Unity which is usually 1-2 weeks.
     
  24. eovento

    eovento

    Joined:
    Feb 22, 2018
    Posts:
    38
    Amazing! Thanks!!
    Is it possible for us to have an idea of improvements in the update while we wait for it to be on the store?
    I'm specially curious about the 'time gaze' feature someone else also showed interested (for circumstances we can't use a controller or any button).

    Thank you again, anxious for the update! :)
     
  25. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    For the time gaze it's basically an update to existing components to allow selecting "hover click" as an option. This is basically modifications to Easy Input Helper, input module, pointer click receiver, etc. From a user's perspective it's basically an additional dropdown in those components where you would have previously selected gear vr trigger or another button and now you select hover click. Additionally, there are options in the main Easy Input Helper for if you want hovering enabled, how long you want the hover click to occur at, and how still you need to be for it to be considered a click, etc.

    I can go into the other unrelated additions as well (look fly controller, orientation controller, and so on) if you instead meant an overall list of all the additions.
     
  26. rrabi

    rrabi

    Joined:
    Aug 4, 2015
    Posts:
    2
    Greetings, I purchased this asset yesterday and i am in love with it so far.
    Even though the title clearly states that its for Oculus Go and GearVR, but can i use gaze pointer and run the demo on cardboard. Also if i can use the pointer with HTC vive? i am asking in terms of if its is easy to modify to make it work on those platforms ?
    I tried removing the Oculus SDK and adding CardboardSDK, but when building and running on phone, it still launches the gearVR guide.
     
  27. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    In general out of the box this isn't supported, but in general there are two parts to easy input (the event system and the getting the raw data from the sdk). The event system and all the inspectors don't use anything sdk specific so can be used on anything. The part that would need to change is getting the raw data from the sdk (in this case Oculus). Cardboard/daydream uses Google so that would need to be changed to use that. These changes you would do mostly at the bottom of easyinputhelper.cs. basically where you see ovrinput you'd change it to the Google equivalent.
     
  28. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The grab reciever has options for movement/rotation in all directions based on what you set in the inspector. When you grab the object is essentially attaches to the laser at the distance you picked it up at. So if it was 5 meters away and you still swing it up and to the right it's still 5 meters away straight line distance but x, y, and z have changed. What you describe is moving closer/farther away after grab and if you enable it in the inspector you accomplish this by clicking up or down on the dpad. With this you can control the object on all axis and place the fruit wherever you wish. It's pretty similar to Zelda:BOTW .

    If you truly want z axis to never change you can lock it the inspector (useful for a sliding door for example) but your case sounded like you want more freedom.

    Certainly let me know if I'm missing something you are trying to accomplish.
     
  29. Ekhymosis

    Ekhymosis

    Joined:
    Oct 29, 2018
    Posts:
    2
    I have a some 360 videos and I want to create a virtual tour with them in Oculus Go... I need to control the scenes with buttons. Is it possible make buttons 'clickables' with your asset?
    Thanks
     
  30. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Yes you can use normal Unity GUI buttons with Easy Input. There is nothing in the product that helps you with the 360 videos, but the button clicking would be taken care of.
     
  31. mikejkelley

    mikejkelley

    Joined:
    Dec 20, 2011
    Posts:
    43
    Hi Greg, I read that at one point you had someone testing a Playmaker script for you but they flaked. I can test it for you and I know another user who could help with the coding too. I'd really like to see Playmaker interaction. If it comes to fruition, I'll probably even make a tutorial for it. Thanks!
     
  32. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That was quite a ways back, so I have no idea if it worked in the past or if playmaker has changed their API since then but I've attached that file. Essentially add the variable names that you see in the file to playmaker and you should be able to access them. Obviously it's low level (trigger, touch click, orientation, etc.) but should be enough for basic needs. Obviously the main way I support not needing to code is through my components (laser pointer, grab receiver, etc.) and they can coexist with playmaker.

    This should allow you to know the state of the buttons within playmaker though (assuming it works). Obviously it requires Easy Input to also be in your project.
     

    Attached Files:

  33. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Just an update on this. It went through review and got rejected due to the way my popup menu currently works. I am going to make those changes and resubmit this week. The Unity rep said that I shouldn't have to wait in the full queue again so hopefully it shouldn't take too much longer.
     
  34. Ekhymosis

    Ekhymosis

    Joined:
    Oct 29, 2018
    Posts:
    2
    Thanks... I am very new in Unity, I want to understand your asset. With your asset can I activate any button type?
    My Tour have hotspots.

     
  35. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If I understand you correctly then yes. There are many provided component some for the buttons (trigger, touchpad click, etc) and many others. That being said "tour has hotspots" sounds more like using a laser pointer with waypoints. That is in there too but it doesn't have much relation to a button. Basically you have your laser pointer and then point it at an object with a teleport receiver on it. That's how the included teleport system works.
     
  36. jk15

    jk15

    Joined:
    Jun 23, 2011
    Posts:
    49
    Hi,

    I'm having an issue that Oculus has changed from Oculus Utilities to Oculus Integration. Is this something that a beta you mentioned in another post will fix?

    Thanks.
     
  37. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Oculus Integration and Utilities are essentially the same thing although they did change the folder structure a bit. Oculus just changed where they host it from their own website to the asset store.

    If you're referring to the helper menu not recognizing that you've downloaded the new style folder structure then yes this is fixed. If you want it earlier than when Unity approves of the package simply email our support address with your invoice number.
     
  38. dylanjameswalch

    dylanjameswalch

    Joined:
    Jun 20, 2018
    Posts:
    12
    Hi there,

    I am running into an issue where the reticle snaps back to its original position if my pointer is within a certain proximity of its original position.(In my case: 0,0,0). This only happens upon loading a new scene with a new instance of the camera, pointer, reticle, etc. I have tried to troubleshoot this but have not been able to find the issue.

    This happens both with the editor emulation and on the Oculus Go.

    Have you seen this problem before?
    Thanks for your support.
     
  39. jk15

    jk15

    Joined:
    Jun 23, 2011
    Posts:
    49
    Using this plugin again and still having this problem of the reticle slowly moving toward the controller. I have distance set to 10.

    Any fix you suggest?
    Thanks.
     
    Last edited: Dec 20, 2018
  40. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Can't say I have, especially with it happening at scene start only. Which pointer are you using (gaze, combo, laser, etc.)?
     
  41. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    When you say moving towards the controller, do you mean like a slow floating that is constant or an abrupt change when you hover over objects that you point at and then a snap back when you are no longer pointing at the object?
     
  42. jk15

    jk15

    Joined:
    Jun 23, 2011
    Posts:
    49
    Slowly floating back that is constant.
     
  43. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That's not the previously talked about issue. Can you send me your project to take a look at? Send it to our support email address.
     
  44. jk15

    jk15

    Joined:
    Jun 23, 2011
    Posts:
    49
    Thanks, Will do, I'm away now but will be back in the new year and will be in contact.
     
  45. cbvr

    cbvr

    Joined:
    Nov 25, 2018
    Posts:
    6
    Howdy!
    I can't seem to find this issue posted elsewhere, so hope I'm not being redundant. I'm using the StandardLaserPointer, which has been working great, but I've noticed that if I animate the player parent, "CubeMover" (see Hierarchy and Inspector below) to move to a different location, the laser noticeably lags and appears to follow the controller more slowly during the animation; making it appear to detach from it during the movement. Some lag is even noticeable if the animated movement is quite slow. I thought parenting the reticle sphere to the CubeMover object would solve it, but to no avail. Is there a setting that forces a faster update on the line render that I am overlooking? If it involves tweaking code on the component(s), could you direct me to which one and where? Thanks in advance.

    Laser_lag_setup.jpg
     

    Attached Files:

    Last edited: Dec 28, 2018
  46. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    From your description it sounds like the laser is lagging one frame behind the rest of your body. In general this is likely due to the timing between the Easy Input helper object and the body of your player. More specifically, the line renderer is probably getting drawn before your player has moved.

    The easiest would probably be to go into Unity's project settings and under script execution order and move the relevant character to execute first. I think in general you would only need to move the root of your player but not 100% sure on that you might have to specify the children too. I believe OVRManager and the Easy input executes at -100 so if you move your character to -200 it should disappear. Certainly let me know if it doesn't.
     
  47. cbvr

    cbvr

    Joined:
    Nov 25, 2018
    Posts:
    6
    Thanks for the swift reply. That seemed like a good suggestion. Being a relative newbie, I wasn't even aware of the ability to prioritize script ordering at all, but it makes complete sense. Since I have no other script components that I can order from my parent or children (besides the StandardLaserPointer on the controller), is there a specific component you had in mind that I should add that would represent the "root of the player", or am I missing something altogether?

    And not to muddy the water, but after a check on the Unity Forum, it seems the line renderer lag issue isn't a new one, and doesn't seem to have a readily available solution, especially related to VR controller feedback (scroll down to the bottom of the topic for a couple of woeful comments in that regard):

    https://answers.unity.com/questions/1387219/linerenderer-lags-behind-object-positions.html
     
  48. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There are likely two different things in play here. The Unity updating the controller after late update issue would occur if you are seeing this when the body is stationary and you are waving your head or controller around rapidly. This one as the link suggests there is no way around in Unity's current implementation. That being said it didn't sound like that was what you were seeing, and in practice unless waving around rapidly (think beat saber) you would normally not notice even in VR for most games since you are rarely waving around like a madman.

    The second one sounded more like what you were seeing and would occur if the line renderer code was getting executed during the update cycle before the code that was moving your body. You would see this one frame delay even if the head and controller were stationary and the character was moving. You could fix this by changing the timing as previously talked about. The most foolproof though would be for me to move the rendering portion to late update though if you wish. I'd want to think about this a bit more and make sure there isn't unintended side effects but it should be ok if decoupled correctly.
     
  49. cbvr

    cbvr

    Joined:
    Nov 25, 2018
    Posts:
    6
    Thanks again for the follow-up, and I appreciate you considering the decouple.

    Just to make sure it wasn't something in my project, and to further illustrate the issue, I started a new project and only imported your asset package (no OVR in this case). The attached is the Pointer Example with the Capsule animated side-to-side. Though this is captured from the screen in Unity, the lag is very similar to what appears my project and the Oculus Go headset. I reduced the controller box by 50% and put a transparent material on it to better view the laser:


    In this case, the only scripts available to prioritize are the Easy Input components, and prioritizing those attached to the Capsule or box produced no change in the lag when set to -200 over EasyInputHelper (in the case of the StandardLaserPointer, the laser and controller box didn't appear at all, as it apparently requires the EasyInputHelper to appear):

    Script order question.jpg


    I'd attempt to decouple the line renderer myself, but unfortunately I don't have the coding skill (though I did give it a frustrating hour of my life). Any help will be hugely appreciated.
     
  50. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Thanks for the video! No that's not normal and that's not just one frame either (what's especially weird is that it isn't constant it seems to float). I don't get that when running locally. What Unity version are you running? I can see if I can replicate it tomorrow on that version.