Announcement

Collapse
No announcement yet.

VR UMG Interface set focus issue

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [VIVE] VR UMG Interface set focus issue

    UE4.13

    To save the game, I spawn an actor that consists of multiple UMG WidgetComponents. I have a TextBox placed in one widget, a virtual keyboard placed in another widget.
    The keyboard uses WidgetInteractionComponent (WIC) to send (Send Char node) to unreal.
    Without changing anything about the input, I can select the textbox and press on the keyboad buttons -> Works.

    After spawn of the actor, I want to set focus to the TextBox, to make input from the keyboard go into that box without selecting it first. But canĀ“t manage to do this without breaking the whole input. Everywhere on the forum they tell you to use "Set Input Mode Game and UI". This does not work, cause when executing that node, it seems Windows (OS) is loosing input focus to the game. (After Node execution the mouse breaks free and is moveable across the whole monitor (game is only a small window) and the WIC does not receive the input from the Vive controllers any more. Using SetKeyboardFocus does not work either, cause it breaks input from the WIC. SetUserFocus turns out the same. SetInputModeGameOnly prevents interaction with UMG as it should.

    What focus is set when clicking into the TextBox with WIC?

    How to set the focus to the TextBox automatically but be able to press buttons on different widgets?
    DebugWidget - Helper for debugging in VR and other means
    WidgetBox - Recycle your widgets the smart way
    NotificationBackbone - Send notifications across your whole project
    SteamWorkhop - Blueprint wrapper with full access
    UnrealPluginBuilder - Package Plugins for multiple engine versions via Drag&Drop

    #2
    We have this question too, did you ever find a solution?

    Comment


      #3
      Apparently in UE 4.15 this is fixed, but I solved it in UE4.14 by writing my own WidgetInteractionComponent that sends input events with a PlayerController user ID set to 0 (instead of a virtual player controller's ID). I can then focus and navigate on widgets after calling both SetUserFocus and SetKeyboardFocus.
      Note: in some cases, the default widget navigation led to crashes in shipping builds for me, so I had to catch the navigation events and recreate navigation by hand using OnPreviewKeyDown.
      Last edited by Till Riemer; 05-09-2017, 04:30 AM.
      Till Riemer - Game Programmer

      ROCKFISH Games GmbH
      Hamburg, Germany

      Comment

      Working...
      X