Search Unity

Hololens Input Module

Discussion in 'VR' started by Shubham_16, Sep 19, 2016.

  1. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    I have started to use HoloLens Input Module (added to in my project's Game Manger's Event system). This (http://forum.unity3d.com/threads/unity-ui-on-the-hololens.394629/ ) post mentions that sliding navigation gets distorted but still works. But in my project the sliding gestures works once and then freezes. Any idea how to fix this?
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    What version of the HTP branch are you using?
     
  3. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    UNITY 5.4.0F3 HTP
     
  4. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    Use Case: I am creating a date picker like attached image. It rotates first time on gesture (pinch plus moving vertically Up or down) but later it didnt work.
    I am also not able to scroll in a normal text based panel in my project.
    Earlier we used Gaze Input Module (http://ritchielozada.com/2016/01/01/part-8-creating-a-gaze-based-input-module-for-unity/) where scroll works fine but Physical keyboard has issues. so migrating to holo input module.
     

    Attached Files:

    • date.png
      date.png
      File size:
      54 KB
      Views:
      1,261
  5. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Can you verify in your project that you have HoloLens Input Module and HoloLens Input in your event system. Also, can you submit a bug with a repro project so we can investigate?
     
    sbagchi likes this.
  6. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    UNITY 5.4.0F3 HTP, only HoloLens Input Module is available. There is no HoloLens Input. I will submit a bug after some more testing. Thanks
     
  7. TerraSame1

    TerraSame1

    Joined:
    Nov 12, 2010
    Posts:
    151
    Wondering about this as I can't find the "HoloLens Input Module" anywhere...
    Where can I find that file" ? Anyone?
    Thanks...
     
  8. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    5.4.0f3 HTP does have the HoloLens Input Module. You will not find the script because it's built into the editor dll
    upload_2016-10-18_10-32-52.png
     
    Last edited: Oct 18, 2016
  9. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    Does the classes in HoloLensInput module inherit from PointerInputModule class of UnityEngine's eventsystem?
     
  10. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    In Unity3d 5.4.0f3 , we have Holo Lens Input Module (script) while in later beta releases like 5.5.b10, it has HoloLens Input Module(script) and Holo Lens Input (Script), i.e. a two separate scripts. Does this mean by any chance version 5.4.0f3 wont handle bluetooth keyboard input properly?
    I am facing issues with bluetooth keyboard where the keyboard is detected but values input on Physical keyboard are not reflected into input field. By keyboard is detected i mean, our Virtual OnScreen keyboard gets suppressed when we click any button bluetooth keyboard. I had to put a patch to make the hardware keyboard work.
     
  11. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
  12. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    @Hodgson_SDAS @Unity_Wesley Thanks, i can see the new Input Manager will be way better ! but still i couldn't find answer to my question. The problem i am facing is : After attaching the script Gaze Input Module (http://ritchielozada.com/2016/01/01/part-8-creating-a-gaze-based-input-module-for-unity/) in my GameManager Event system, my hardware keyboard doesn't work. I guess some events clash between HoloLens Input Module and Gaze Input Module. The former is critical for my project as it handles the scroll gesture which wasn't working properly in 5.4.0f3 (using HLinputModule) . Somehow i managed to make scroll and physical keyboard work at simultaneously by adding the following piece of code to my custom InputField derived from Unity's InputField Class

    public void Update()
    {
    if (m_currentSelectedInputField != this)
    {
    return;
    }
    if (!Input.anyKeyDown)
    {
    return;
    }
    if (Input.anyKeyDown)
    {
    #if NETFX_CORE
    ProcessEvent(Event.current);
    UpdateLabel();
    #endif

    }
    }
    does the new HoloLens Input Module handle the scroll gesture?
     
  13. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Hello,

    In the latest 5.5 beta's the scroll gesture is working with the input manager. I believe you have to be looking at the scroll bar in order to move the it.

    Another option for scrolling is to use Gesture Recognizer Navigation events to control the scroll bars.
     
  14. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    @Unity_Wesley Thanks bro! Yes, in 5.5bets Scroll works along with the hardware keyboard. But additionaly we have to add BaseInput script apart from HoloLensInput Module and Hololens Input. Isin't? or baseInput is meant for something else?
     
  15. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    I created a sample project to test HololensInput Module on scroll and bluetooth keyboard. While testing the scroll works fine but focus of the InputField (UnityUI gameobject) doesn't stay. I am not able to enter more than 2-3 characters as focus from input field changes (i m printing on screen if the input field is focused). By default, if i click a inputbox, i should be able to enter text as long as i don't click somewhere else..Am i mssing something?
     
  16. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Can you enter a bug for this issue please so we can investigate? I think you should be able to type as long as the Input field has focus.
     
  17. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    Yes i submitted. The problem i had was that the inputfield focus wan't stable. So i added gaze stabilizer from HoloToolKit provided by Microsoft to stabilize it but it didnt help. Please have a look.
     
  18. VeerpalK

    VeerpalK

    Joined:
    Jul 4, 2018
    Posts:
    14
    Hi,
    I am facing kind of same problem ,
    When i apply HoloLensInputModule to EventSystem my RadioButtons works fine but my SimpleButton takes response two times.
    and when i don't use HLInputModule my SimpleButton works fine and radio buttons sometimes freezes and causes
    unnaural Behaviour.
    Any Help?

    Please also throw some light on HLInputModule,BaseInput and Input Manager difference and when to use which one.
     
  19. shubham_arora

    shubham_arora

    Joined:
    May 17, 2018
    Posts:
    1
    Use StandaloneInputModule instead of HoloLensInputModule. Everything except scroll rect works fine with it.
     
  20. VeerpalK

    VeerpalK

    Joined:
    Jul 4, 2018
    Posts:
    14
    Hi @shubham i just tried StandaloneInputModule but my radio buttons were not working They were just freezing and needed many clicks.
    Sometimes radiobuttons just work fine like the as they should but sometimes it just crashes.
    I am still not getting whats going on there.
     
    Last edited: Oct 8, 2018
  21. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    What version of Unity are you all on?
     
  22. VeerpalK

    VeerpalK

    Joined:
    Jul 4, 2018
    Posts:
    14
    Hi @JasonCostanza Unity Version that i am using is 2018.1.6f1
     
    JasonCostanza likes this.
  23. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Would you file a new issue with a repro project attached? This thread is so old it could be a completely different thing going on now. I briefly checked toggle buttons and standard buttons and was not having issue, could be a bug but if not I can take a closer look at how you have it configured.