# World Space to Screen Space Function is wrong off bottom of screen

**URL:** <https://forums.unrealengine.com/t/world-space-to-screen-space-function-is-wrong-off-bottom-of-screen/1793949>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 8, 2024, 1:21pm UTC](https://forums.unrealengine.com/t/world-space-to-screen-space-function-is-wrong-off-bottom-of-screen/1793949 "2024-04-08T13:21:00Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [April 8, 2024, 1:29pm UTC](https://forums.unrealengine.com/t/world-space-to-screen-space-function-is-wrong-off-bottom-of-screen/1793949/2 "2024-04-08T13:29:35Z")

</div>

It seems the widget is offset internally somehow. Check the hierarchy and see what is responsible for its desired size - we can’t see it here. You will need to base the calculation on **half** the desired size, as in:

> [@UMG Widget: Stay on screen - But how?](https://forums.unrealengine.com/t/umg-widget-stay-on-screen-but-how/123044/5):
>
> while there’s half a dozen ways to implement this, the gist is to subtract half the widget size from the viewport size and use it as a clamp: vid: [https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4](https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4)

---

_[View the full topic](https://forums.unrealengine.com/t/world-space-to-screen-space-function-is-wrong-off-bottom-of-screen/1793949)._
