Announcement

Collapse
No announcement yet.

Mouse click breaks all input?

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

    Mouse click breaks all input?

    Hi everyone,
    I've been experimenting with UMG and I've come to a problem. As soon as your mouse click, all methods of input don't work. I have no idea what's happened.

    Any ideas?

    I've tried alternative between "Set Input Game / UI" "Set Input UI" and all the other little tricks, but no matter what I try, if the player clicks to get rid of the mouse cursor, all input doesn't work.

    Even setting the mouse cursor to hidden in the Player Controller isn't working.

    It's a really odd issue. I have no idea what's going on.

    I'm doing the usual "Get Key Down / Handled" in the UMG but apart from that, there's no other black magic going on; It's happened in both my recent gamejam project and in my project I'm working on. Is it a bug?

    - Ryan
    KITATUS
    "Information shouldn't be behind a paywall, It should be free for all!"

    #2
    wow, what exactly are you trying to do, kitatus? sounds weird

    could you put a pic up and describe what you are trying to achieve more in-depth
    I've never even noticed a 'getkeydown/handled' in UMG I just use the clicked event, are you trying to use keyboard input (not really working atm) or working on a 3d widget or something (haven't really tried 3d yet either)

    Comment


      #3
      Originally posted by ayretek View Post
      wow, what exactly are you trying to do, kitatus? sounds weird

      could you put a pic up and describe what you are trying to achieve more in-depth
      I've never even noticed a 'getkeydown/handled' in UMG I just use the clicked event, are you trying to use keyboard input (not really working atm) or working on a 3d widget or something (haven't really tried 3d yet either)
      Don't really need screenshots, It's literally just breaking whenever you mouse click. But yeah, just trying keyboard controls.

      I assume I'm going to need to divert the controls into the level blueprint and do it that way, which is major pain in the ***, but if it's gotta be done it's gotta be done.

      ¬.¬

      I've literally just got a menu system where down +1 int and down - 1 int. The input is done via "GetKeyDown" override in the UMG which works great. Unless the player clicks, then poof. All control is gone.

      Even when I assume an action to left mouse button, it's just like "HAHA. NO." and still breaks

      Fiddlesticks
      KITATUS
      "Information shouldn't be behind a paywall, It should be free for all!"

      Comment


        #4
        I am not sure what you want. If you want to be able to stop all keybindings from having an affect from pushed just create a boolen. On each keybinding (eg: on space bar press, jump) add a branch that has it only work if the boolean is true. Than have a way to toggle the bool on and off

        Comment


          #5
          Hi Kitatus,
          I don't know if I have understood your problem, but have you tried to set the visibility of the canvas in UMG to "Visible"?

          Click image for larger version

Name:	HR5Dvpj.png
Views:	1
Size:	191.0 KB
ID:	1071591

          -Philipp

          Comment


            #6
            Oh, the UMG is creating fine. It's just if the player left mouse clicks, it stops any and all other input working. The mouse isn't referenced in the UMG or any other input method, but if the player mouse clicked... Poof, it doesn't allow any other input. ANY other key is fine, just the darn left mouse button
            KITATUS
            "Information shouldn't be behind a paywall, It should be free for all!"

            Comment


              #7
              It is 100% "Set Input Game / UI" "Set Input UI" thing.
              When you click on UMG you change your input focus from game logic to UI logic so every key/mouse button from now on works only for UI and disabled in game logic.
              Set "Set Input Mode Game and UI" node and it should work properly
              SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
              Level design and prototyping for newbies

              Comment


                #8
                Originally posted by zeOrb View Post
                It is 100% "Set Input Game / UI" "Set Input UI" thing.
                When you click on UMG you change your input focus from game logic to UI logic so every key/mouse button from now on works only for UI and disabled in game logic.
                Set "Set Input Mode Game and UI" node and it should work properly
                Tried that, didn't do diddly-squit different Thanks for trying to help though!
                KITATUS
                "Information shouldn't be behind a paywall, It should be free for all!"

                Comment


                  #9
                  Hmph, it's really weird then!
                  Would you mind to share this project if it possible or just describe how to recreate this behavior!
                  SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
                  Level design and prototyping for newbies

                  Comment


                    #10
                    Hello Kit,
                    I was able to replicate the problem, and I do believe it is a bug and for some reason left clicking removes keyboard focus. Not sure why it does.
                    However, a quick workaround would be to add an image background in your UMG widget that covers the entire screen space, and give it an alpha value of 0.
                    This ensures when you left click "off" of anything in the widget it is still technically in the widget.

                    Hope it helps even if its just a work around until the real issue gets addressed.

                    Regards,
                    Levon

                    Comment


                      #11
                      Originally posted by LevonChurch View Post
                      Hello Kit,
                      I was able to replicate the problem, and I do believe it is a bug and for some reason left clicking removes keyboard focus. Not sure why it does.
                      However, a quick workaround would be to add an image background in your UMG widget that covers the entire screen space, and give it an alpha value of 0.
                      This ensures when you left click "off" of anything in the widget it is still technically in the widget.

                      Hope it helps even if its just a work around until the real issue gets addressed.

                      Regards,
                      Levon
                      It's so simple... It's genius!

                      I'll give it a go when I'm next in front of UE4 and report back!
                      KITATUS
                      "Information shouldn't be behind a paywall, It should be free for all!"

                      Comment


                        #12
                        Nah, adding an image that covers the full UMG with opacity set to 0 isn't doing anything :/

                        **** it, This is SUCH an annoying bug.
                        KITATUS
                        "Information shouldn't be behind a paywall, It should be free for all!"

                        Comment


                          #13
                          So here's a trimmed down project if people wanted to test the problem out for themselves (There's some interesting bits of code if anyone wants them, they can have them :P):

                          http://www.kitatus.co.uk/Uploads/PRO...OUSENOWORK.zip
                          KITATUS
                          "Information shouldn't be behind a paywall, It should be free for all!"

                          Comment


                            #14
                            I believe your problem is your UMG_MAINMENU's OnKeyDown.

                            Click image for larger version

Name:	FoundYourProblem.png
Views:	1
Size:	26.9 KB
ID:	1071625

                            You're always returning Handled, regardless of what is pressed. If you handle the key, it stops bubbling. Nobody else gets it, including the viewport, which forwards such things to game framework classes such as APlayerControllers. So as soon as you click on the main menu, your input is going to disappear because the game begins focused on the viewport widget.

                            Comment


                              #15
                              Also, take a look at the localization guide, https://forums.unrealengine.com/show...553#post250553 and https://docs.unrealengine.com/latest...ion/index.html

                              You shouldn't use function bindings to try to make a custom localization solution like that. FText is already a localizable string.

                              Comment

                              Working...
                              X