# 壁などの遮蔽物越しにUIを非表示にしたい

**URL:** <https://forums.unrealengine.com/t/ui/1988374>\
**Category:** 日本語 (Japanese)\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [August 23, 2024, 2:29am UTC](https://forums.unrealengine.com/t/ui/1988374 "2024-08-23T02:29:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [August 29, 2024, 9:56pm UTC](https://forums.unrealengine.com/t/ui/1988374/6 "2024-08-29T21:56:56Z")

</div>

I’m pretty confident that if you change the Widget Component’s “Space” to “World” it should get occluded correctly.  
The problem then will be that the Widget will not face the camera when you rotate around.  
The usual fix for this is to add some logic on the Widget “Actor” to update the rotation to face the camera. Usually on “Tick”.  
By the way, your scene looks beautiful.

Also note the alternative solution using “Was recently rendered”.  
You can keep the widget in “Screen” space. but you’ll need an extra component with “Cast shadows” set to off. Maybe a sphere collision or mesh is ok.

以下は、ご要求の内容を日本語に翻訳したものです:

ウィジェットコンポーネントの「Space」を「World」に変更すれば、正しくオクルージョンされるはずだと私は確信しています。  
その場合の問題は、ウィジェットがカメラの回転に合わせて向きを変えないことです。  
この問題の一般的な解決策は、ウィジェットの「Actor」にカメラに向かって回転を更新するロジックを追加することです。通常は「Tick」で行います。  
ところで、あなたのシーンはとてもきれいですね。

また、「最近レンダリングされた」を使った代替ソリューションにも注目してください。  
ウィジェットを「Screen」スペースのままにしておくことができます。ただし、「キャストシャドウ」をオフに設定した追加のコンポーネントが必要になります。スフィアコリジョンやメッシュでも構いません。

Please see this link:  
こちらのリンクをご覧ください:

> [@Widget component 'screen space' occlusion.](https://forums.unrealengine.com/t/widget-component-screen-space-occlusion/23449/7):
>
> When set to World guess you could always brute force the widgets scale relative to camera if you dont mind it clipping through actors: [WidgetBruteForce] [WidgetOccludedWorld] or when using Screen just turn it off when a specific component (with cast shadows set to false) has been occluded: [WidgetOccluded]

---

_[View the full topic](https://forums.unrealengine.com/t/ui/1988374)._
