How can widget components be obscured in a scene?

The building model does not block the POI Widget in the diagram below.

You’re drawing them in screen space, so they draw on top. Set them to world space.

How do widgets set locations when setting world space?

They behave like any other component, they follow their owning actor using relative transform as offset.

Essentially, you do not need to move them, they move on their own.

If they’re not placed where you think they should, that’s probably due to their hierarchy. If the POI has a canvas, its anchors will affect overall placement as the entire widget is used to texture a quad.

They also get occluded, so if you place it inside the sphere static mesh, you won’t see it. This can be disabled, but considering your other posts, that’s not what you’re after.

Thank you for your questions and answers.Have been solved.
But there’s a problem.poi widget are too small when the view camera is too far away.

How does the poi widget automatically scale when the widget set the space property to world?

They do not. You can scale them yourself based on the distance.

Is there any relevant formula or code you can refer to?

relevant formula

Distance / x


I think that a more important question here is a design one - do you really want the POI icons occluded by geometry:

image

You’re risking hiding what seems to a critical part of the user interface.


You could try regular screen-space widgets (so you do not need to worry about scaling and quality) but instead of resizing them, work with their zOrder and clamped transparency. This could a nice middle ground where UI clutter is minimised, layers makes sense and the entire interface is there and interactive. Consider it.