x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG Widget Events broken behavior with mouse interaction

In the sample project provided, I have a "Hud" user widget in the viewport when play is pressed. It shows a simple button with multiple layers all marked self-hit-test-invisible except the button. The Hovered/Unhovered and Clicked events are defined for the test.

Expected behavior (works in 4.15.1):

  1. On mouse Hovered/UnHovered the button changes color to give feedback

  2. On mouse Clicked the button border color changes (acting as a toggle button)

Unexpected behavior (broken in 4.16.1):

  1. On mouse Hover the button does not trigger the OnHovered event as you would expect unless you click inside the button at which point the hover/unhovered events work. Clicking inside the button once more stops the events from triggering.

  2. On mouse Clicked the button never triggers the OnClicked event to change the border color

Please see attached sample project in 4.15 then migrate to 4.16.1 to compare before and after.

link text

Product Version: UE 4.16
Tags:
more ▼

asked Jun 06 '17 at 10:33 PM in Bug Reports

avatar image

Raf_L3O
51 6 9 11

avatar image maljkovicdusan Feb 11 '19 at 01:35 PM

Hi Guys,

has anyone solved this issue? I have the same problem with a canvas:

I have 2 widgets, widgetTOP and widgetBOTTOM. widgetTOP has a canvas which is set to self-hit test invisible and my clicks are not going through to widgetBOTTM where all my buttons are.

Thanks,

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello Raf,

I believe that this is working as intended and that the issue is actually occurring in 4.15, here's why.

Your project's setup in 4.15 has your checkbox at the bottom of the hierarchy, which means that your checkbox is rendered above all other components (See Screenshot_01). This means if working as intended, the button should not be accessible for events such as hovering or being pressed because the checkbox is being rendered on top of it. This is the behavior that is being displayed in 4.16.

In 4.15, despite the checkbox being rendered on top of your button, the button is still able to register events, this behavior is unintended. When you are upgrading your project to 4.16 this unintended behavior is being corrected in 4.16, this is what is causing the issue you are experiencing in 4.16.

To work around this issue, simply reorder so that your button lower in the hierarchy (screenshot_02).

Cheers!

alt text Image of how Z Order renders alt text Image of reordered hierarchy

more ▼

answered Jun 07 '17 at 08:29 PM

avatar image

Thomas G ♦♦ STAFF
7.1k 64 4 54

avatar image Raf_L3O Jun 07 '17 at 08:53 PM

Hi Thomas, thanks for responding.

I think you missed one part in this. The visibility for the checkbox is set to self-hit test invisible, the cursor hit test should be passing through and register the event on the button underneath it. Don't you agree?

avatar image Thomas G ♦♦ STAFF Jun 08 '17 at 07:46 PM

With the setup From your project, I was able to get the expected result by changing the check from "Self Hit Test Invisible" to "Hit Test Invisible".

avatar image Raf_L3O Jun 08 '17 at 10:15 PM

Yes I can confirm that but the "Self Hit Test Invisible" should also work.

In a more complex widget you may want the children of the checkbox to register events and setting "Hit Test Invisible" would not work with it's children.

This sample project was just to demonstrate the issue with 4.16 which is clearly a bug with at least check boxes. Our project uses hundreds of widgets and many rely on this functionality to work correctly.

avatar image Thomas G ♦♦ STAFF Jun 09 '17 at 04:11 PM

I am seeing an issue with the checkbox in 4.16 and have logged a report for it here:

https://issues.unrealengine.com/issue/UE-45885

You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question