Announcement

Collapse
No announcement yet.

Mouse events not registering properly

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

    Mouse events not registering properly

    I'm having a weird problem getting mouse events to register when using blueprints.

    To show the problem I have created the simplest possible set up – on MouseDown, MouseUp and MouseDoubleClick I have set it up to log to the screen 'Mouse Up', 'Mouse Down', 'Double Click' respectively:

    Click image for larger version

Name:	Screen Shot 2015-07-14 at 12.18.34.png
Views:	1
Size:	38.0 KB
ID:	1155542
    Click image for larger version

Name:	Screen Shot 2015-07-14 at 12.18.45.png
Views:	1
Size:	36.9 KB
ID:	1155543
    Click image for larger version

Name:	Screen Shot 2015-07-14 at 12.18.50.png
Views:	1
Size:	39.9 KB
ID:	1155544

    Couldn't be simpler. And yet, what happens is that when I start the PIE, the first click registers and logs the message 'Mouse Down', but does not log 'Mouse Up' when released, no matter how long I hold the button for. And after the first click, no other clicks seem to be registered, nor messages logged. The double click works fine, however, just not single clicks.

    If I then press Shift+F1 to get the cursor back, and then click again, it registers another click and logs the 'Mouse Down' message.

    The only way I can even get it to register a MouseUp is if I click and hold, the press Shift+F1, and then release the mouse button.

    Note that this is the same whether I create general override functions or create specific bindings to something like a border object.

    I'm trying to build some pretty basic functionality around being able to click on the screen, but it's not possible since it doesn't even seem to be registering clicks properly and creating the corresponding events.

    Anyone know what's going on?

    I'm using UE 4.8.1 on Mac OSX 10.10.3

    #2
    You enabled mouse click events too right?

    Comment


      #3
      Yes, in the level blueprint I have activated mouse click events and show cursor for player controller 0.

      If you run the same setup, does it work for you?

      Comment


        #4
        The fact that your cursor is disappearing is strange. I'm working on a project that exclusively uses the mouse and we've had no problems with any of the mouse events. What context are you using the mouse cursor events in? Is the cursor only supposed to be on screen at certain times or all the time? Is this in conjunction with a UMG widget? What does the mouse interface section in your player controller look like? Here's mine:

        Mine is a completely mouse driven game though.

        It isn't too hard to turn these guys on and off though in blueprint, if you need to. If you are using a UMG widget you will need to make sure you are setting the input mode as well.
        Attached Files
        CTO Villusion Studios
        Grad Student in Interactive Design and Game Development, SCAD
        company site: http://www.villusionstudios.com/

        Comment


          #5
          Thanks for your reply.

          I have followed the instructions here for setting up a mouse controller, with the same Mouse Interface settings as you've suggested: https://docs.unrealengine.com/latest...tup/index.html

          The cursor is showing fine now, that was an error on my part.

          But I can still only get Mouse Up events when I double click, not for single clicks.

          Trying to build a workaround, but would love to know why this problem exists and how to fix it.

          Do you get a mouse up event on single clicks? Is it just me?

          Comment


            #6
            I'm still not quite sure what exactly you are trying to do. Why can't you just detect the mouse down and up with the "pressed" and "released" outputs on the mouse event you use?

            Attached Files
            CTO Villusion Studios
            Grad Student in Interactive Design and Game Development, SCAD
            company site: http://www.villusionstudios.com/

            Comment


              #7
              I have a similar problem. The Mouse up and down event register and the string prints as per the blueprint. However the cursors do not change
              a) for mouse down after the second click
              b) for mouse up unless the mouse is moved

              Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	93.5 KB
ID:	1105020

              Comment


                #8
                In case anyone gets the same problem and searches for it, I had the same problem but it seemed to be because I changed the input mode to Game only instead of Game and UI. So after changing the input mode to Game and UI it magically worked again

                Comment

                Working...
                X