# Widget Interaction Component in screen space

**URL:** <https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500>\
**Category:** UI\
**Tags:** unreal-engine, UE4-26, UE4, question\
**Created:** [February 10, 2022, 10:36am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500 "2022-02-10T10:36:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 10, 2022, 10:36am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/1 "2022-02-10T10:36:26Z")

</div>

Hi,

I’m trying to create button where you aim at it to press it (no mouse cursor, but you should be able to click to press the button).

Basically I have an NPC with a widget component attached to it, and a widget interaction component attached to my player character. When I setup the widget in `world space` everything works correctly. But as I don’t want it to create shadows or be occluded, I want it in screen space but the widget interaction component on my character doesn’t seem to work anymore (no hover reactions and can’t click on the buttons).

Example of what I’m trying to achieve: [UI\_ref.mov - Google Drive](https://drive.google.com/file/d/1w8BBEPDc6U7V9yzPAWO5v_VNh3EdNwYr/view)

---

<div class="post-metadata">

**Author:** ![HAF-Blade](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haf-blade/32/88718_2.png) [@HAF-Blade](https://forums.unrealengine.com/u/HAF-Blade)\
**Post date:** [February 10, 2022, 10:41am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/2 "2022-02-10T10:41:54Z")

</div>

> **[Creating 3D Widget Interaction](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UMG/HowTo/InWorldWidgetInteraction/)**
>
> An example of how to create in-game 3D widget interactions.

Perhaps this helps

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 10, 2022, 10:57am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/3 "2022-02-10T10:57:08Z")

</div>

Thanks , but it only works in world space for me.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 10, 2022, 11:52am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/4 "2022-02-10T11:52:27Z")

</div>

In my understanding this should not work. The interaction component traces against the quad geometry generated by the widget component’s world space setting. Afaik, this quad is not there while we’re in screen space.

> But as I don’t want it to create shadows or be occluded,

Both can be disabled. The only downside is that 3d widgets are nowhere nearly as _crisp_.

Occlusion:

> [@Is it possible to make 3d UMG widgets never get occluded?](https://forums.unrealengine.com/t/is-it-possible-to-make-3d-umg-widgets-never-get-occluded/408536/2):
>
> Yes. find material in the engine content: Widget3DPassThrough duplicate it and move it to your project. open the material and Disable Depth Test in the advanced part of the Translucency tab assign material to your widget component

Shadows:

Widget Components do not cast shadows?

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 11, 2022, 8:40am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/5 "2022-02-11T08:40:51Z")

</div>

Thank you for your help, in my case they have shadows (following image).

It would be better to have them in screen space anyway. Do you have an idea how to reproduce the behavior of the widget component interaction in screen space? I thought about a virtual mouse but it doesn’t seem to be a good solution in UE.

Edit: With the solution you gave me, widgets don’t have shadows and are not occluded anymore.

Edit 2: And you’re right, it’s very blurry in world space. I can’t have a clear text, it’s always blurry.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/e/4def9cbdfeed7405b57eb362ca71d404bb52d9ee.jpeg)

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 14, 2022, 9:27am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/6 "2022-02-14T09:27:21Z")

</div>

SOLVED for me at least but this is a dummy solution I think.

For the occlusion I followed Everynone solution :

> [@Is it possible to make 3d UMG widgets never get occluded?](https://forums.unrealengine.com/t/is-it-possible-to-make-3d-umg-widgets-never-get-occluded/408536/2):
>
> Yes. find material in the engine content: Widget3DPassThrough duplicate it and move it to your project. open the material and Disable Depth Test in the advanced part of the Translucency tab assign material to your widget component

And for the text being blurry :

- Increase the widget component draw size 2
- Decrease the widget component scale by 2

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 14, 2022, 9:35am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/7 "2022-02-14T09:35:37Z")

</div>

> [@Dragoon-scales](#):
>
> And for the text being blurry :
> 
> - Increase the widget component draw size 2
> - Decrease the widget component scale by 2

Are you still getting consistent hit results with this?

* * *

Also, if your widget is transparent:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/2/0f2e0578a4c4bbb5c8782a18f7abd27b1e7f9cd4.png)

May or not may not help. Depends on the scene setup.

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 14, 2022, 10:00am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/8 "2022-02-14T10:00:52Z")

</div>

Yes the hit results are still consistents. I’m just wondering about performance with this but that’s another question.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 14, 2022, 10:04am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/9 "2022-02-14T10:04:00Z")

</div>

> [@Dragoon-scales](#):
>
> I’m just wondering about performance with this but that’s another question.

You’re going to have how many on the screen at a time? Fewer than 10? Negligible is what I’d describe the worst case scenario.

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 14, 2022, 10:10am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/10 "2022-02-14T10:10:34Z")

</div>

Okay nice, i just noticed that the solution to remove occlusion doesn’t remove reflection. Any ideas on that?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 14, 2022, 10:45am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/11 "2022-02-14T10:45:47Z")

</div>

> [@Dragoon-scales](#):
>
> doesn’t remove reflection.

Widgets reflect. Or are reflected?

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 14, 2022, 10:56am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/12 "2022-02-14T10:56:07Z")

</div>

Widgets are reflected :  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/0/420c7903ced19b3719e40d9d9cacf0039fb751b5.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 14, 2022, 11:45am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/13 "2022-02-14T11:45:11Z")

</div>

My knowledge here is limited.

Someone will hopefully correct me if I’m wrong but I don’t think you can disable reflections on _per object_ basis; that’d be to due to the way PBR works and the whole deferred rendering pipeline.

You can use a post process volume or a camera to adjust intensity of the reflections. A value of 0 would disable them _all_, this can be adjusted dynamically - as soon as the widget pops up or goes away.

* * *

Consider posting a new question in the rendering section, perhaps someone more knowledgably can chip in.

---

<div class="post-metadata">

**Author:** ![Dragoon-scales](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dragoon-scales](https://forums.unrealengine.com/u/Dragoon-scales)\
**Post date:** [February 14, 2022, 11:47am UTC](https://forums.unrealengine.com/t/widget-interaction-component-in-screen-space/496500/14 "2022-02-14T11:47:25Z")

</div>

Thank you for your help!
