Widget Interaction Component hits the whole 3D-widget and not just the buttons.

Hi!
I have encountered a problem with the Widget Interaction Component. I have made a widget, it’s a screen with a button. Everything on the widget except the button is set to not hit testable. The button is set to visible. I place this widget as a 3D-widget in the world and use a Widget Interaction Component to interact with it.
Here is the problem though, I get two different results. The first is that the trace just doesn’t get blocked when it hits the widget. it just goes through. If I change the collision and trace channel I get a hit, but now it hits the whole widget, even the parts that is set to not-hit testable.
I have seen that others have similar problems and have figuerd out that the block is for the whole quad the widget is rendered to.

So my question is, is it even possible to get it to trace only the visible elements and skip the not-hit testable parts when using a Widget Interaction Component and a 3D-widget?

1 Like

What’s the Window Visibility set to on the component itself:

1 Like

Self Hit test Invisible

1 Like

I wanted to say yes, but you made me doubt myself. And indeed, the WIC does hit the widget quad even though its Window Visibility is set to Self Hit Test Invisible. Is this regression? I remember this working the way you expect it, or I hallucinated it. :dizzy:

Can anyone else confirm? Tested in v5.3 and v5.5. Perhaps there’s someone with UE4 around?

  • the Overlay and the widget root are Not Hit-Testable (Self)

There are no bugs in the DB related to this.


@AGhol what’s the scenario where this becomes a problem? Do you have a scene where there are other world space widgets behind? If you wanted to hit non-widgets behind the widget component, you can use a regular trace instead.

1 Like

The purpose for this is to be able to activate buttons on a 3D-Widget screen. Imagine a scenario where you are in a VR-world, you move to a computer screen and you want to interact with multiple buttons on the screen. It would be nice to be able to do this as one widget and not use multiple widgets for each button to simulate a screen. The problem is that because it register the quad as a hit it doesn’t register when hovering a button, because it’s already “hitting”. Thanks for taking the time looking into this!

That’s not the case here. I’m hitting the buttons with no issues.

Yeah, now it works… who knows man. But thank you so much!!

1 Like

Hi again, I don’t want to create another post with such a similiar topic, and you seem to have a lot of knowledge about this stuff so. I have another problem. When using the interaction component with settings:
Pointer Index: 1
Trace Channel: 3D widget
Interaction Source: World

The trace works correctly.

When I add another interaction component with the settings:
Pointer Index: 2
Trace Channel: 3D widget
Interaction Source: Custom

Together with a script that runs on each tick:
A sphere trace by channel with trace channel: 3D widget

The Out Hit result goes to the interaction components Set Custom Hit Result function.

The sphere trace does never register a block of the Widget. I have even tried to change trace channel with no result. Do you know why the Sphere trace might have problem with hitting the widget while the other interaction methods don’t?

Sphere trace does not work for this afaik. It has to be a special trace the player controller or the widget interaction component perform. A regular line trace would not work either.

Note that world hit is automagically converted into widget geometry interaction - something you’d have to write from scratch were you to opt for a custom trace.