# possible to track screen position of object that is offscreen?

**URL:** <https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Widget, question, Blueprint, UMG\
**Created:** [April 25, 2023, 7:56am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287 "2023-04-25T07:56:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 7:56am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/1 "2023-04-25T07:56:26Z")

</div>

Hi,

i have a widget that is scrolled offscreen in my menu. However the position of the widget is the start point of a spline . so when the widget is scrolled just off the edge of the screen, the position cant be sourced any longer and the spline dissappears.

Is there a way to tracke the offscreen position of a widget ?

thanks,  
Sam

---

<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 25, 2023, 9:37am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/2 "2023-04-25T09:37:51Z")

</div>

> when the widget is scrolled just off the edge of the screen

What is moving the widget off-screen and how?

* * *

You could use a widget component in screen space mode. This way you would not need to project screen coords back to world for the spline location, and could use widget component’s location directly instead.

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 11:00am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/3 "2023-04-25T11:00:08Z")

</div>

its moving off screen because widget is inside a scroll box

---

<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 25, 2023, 11:07am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/4 "2023-04-25T11:07:06Z")

</div>

> Is there a way to tracke the offscreen position of a widget ?

Ah, so the catch is that it’s the scroll box widget that shifts it. It’s unlikely you’ll get results screen space geometry but you could calculate it manually.

You know the size of the scrollbox, you know the size of the child widget and the scroll box can spit out an offset of the child. You could then project the point past the screen edge.

Worst case scenario, you could _fake_ it. You could say the coords are _yay that much_ beyond the screen’s bottom edge.

* * *

Just to clarify: you want this, right:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/d/15deeb2e03cc777f5384bc6aa7e8c1a53bff9c24.png)

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 11:10am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/5 "2023-04-25T11:10:54Z")

</div>

i thought it might involve a bit of trickery. I currently am using ‘get tick space geometry’ which is working fine for when the widet is within the scroll box bounds.

I guess i can just have some kind of expression that ‘if outside frame’ add scroll value to the tick space geometry position value or something

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 11:15am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/6 "2023-04-25T11:15:41Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/e/45eec4bc21b9c68c37fb33bd9f5caf95c67632ac.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/1/4517c7c075f526f083873a34e1207af206b50c61.png)

---

<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 25, 2023, 11:33am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/7 "2023-04-25T11:33:28Z")

</div>

> [@TheGreatShampoo](#):
>
> ‘if outside frame’

The List View (a very fancy scroll box) knows whether each child is showing or not since its main job is to maintain their life cycle.

It’s a much more complex upfront setup, though.

* * *

> a bit of trickery

Sounds like it, you’re asking for something UMG cannot do on its own. See if you can calculate offset from the combination of those:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da31bab8073ea83f77f37e16fdc9b9106320dbb1.png)

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 11:41am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/8 "2023-04-25T11:41:16Z")

</div>

thanks for the help.

---

<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 25, 2023, 11:42am UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/9 "2023-04-25T11:42:32Z")

</div>

Is this supposed to work like a giant tech tree? Like in 4x games? If so, I’d gravitate away from the scroll box - that’s the element that obfuscates its methods the most.

To me it sounds as if it was much easier to make your own _scrollbox_ rather than force the native scrollbox do things your way.

I’d lean towards the humble canvas panel that allows you to place things at specific coords (beyond screen space is fine!) and retrieve that location with ease from the slot.

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 1:42pm UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/10 "2023-04-25T13:42:58Z")

</div>

the whole point is to basically have a flow chart. Which effectively is taking up a large canvas. But i want to be able to navigate around each step of the flow chart, and also zoom in and out .

I thought couching all the widgets inside a scroll box, that is also inside a zoom box would be the best idea.?

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 2:58pm UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/11 "2023-04-25T14:58:23Z")

</div>

was looking into this, it might be the best option to just use a canvas.

So would i basically have to make the canvas massive, To have enough space to house any potention steps in the flow chart. And i guess then everything can just be zoomed into navigated around on.

---

<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 25, 2023, 3:03pm UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/12 "2023-04-25T15:03:24Z")

</div>

> [@TheGreatShampoo](#):
>
> But i want to be able to navigate around each step of the flow chart, and also zoom in and out .

Well, you’re in luck!

> [@How to scale/zoom a widget with blueprints?](https://forums.unrealengine.com/t/how-to-scale-zoom-a-widget-with-blueprints/430983/25):
>
> By somewhat popular demand, I’ve updated this to support adding points of interest: re-jiggled the hierarchy by adding an inner canvas with auto size; we now shift that canvas instead of the image, which also moves and scales all elements attached to it

---

<div class="post-metadata">

**Author:** ![TheGreatShampoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheGreatShampoo](https://forums.unrealengine.com/u/TheGreatShampoo)\
**Post date:** [April 25, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/possible-to-track-screen-position-of-object-that-is-offscreen/1140287/13 "2023-04-25T15:18:08Z")

</div>

nice!  
thanks
