# Get actor position inside a Render Target (UMG)

**URL:** <https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727>\
**Category:** Rendering\
**Tags:** world, project, space, Render-Targets, unreal-engine, screen, question\
**Created:** [August 20, 2021, 12:38pm UTC](https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727 "2021-08-20T12:38:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [August 20, 2021, 12:38pm UTC](https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727/1 "2021-08-20T12:38:52Z")

</div>

Hello there,

I wanted to make some kind of spawn UI in which (amongst other things) the player can see the Map from the front and click on a point where they want to spawn. These points are predetermined by actors.

And this is what I did:  
I created a 2d Scene Capture Camera to render the scene to a render target to use it inside of UMG:

 ![346757-bild-2021-08-20-143222.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/0/ed0fca81136ab623a6b58c04ef3408f9f147c10e.png)

 ![346758-bild-2021-08-20-143254.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/c/adc34965b2ee9199e3d106854a81db4cd273dc8e.png)

My problem:  
I don’t know how to determine the location of the Spawn Point Actor in the Screenspace of this image widget. I tried setting the 2d scene capture as active player cam and play around with “Project world to screen”, but somehow I can’t get the right position out of that.

Does anyone have a clue what I can try to make this work? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [August 20, 2021, 2:35pm UTC](https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727/2 "2021-08-20T14:35:12Z")

</div>

Hello! Why just dont set Visible to false for all actors that should not be visible while Spawning? Is there some other purpose to use Render Target instead of basic Viewport?

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [August 20, 2021, 3:19pm UTC](https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727/3 "2021-08-20T15:19:34Z")

</div>

Thanks for your answer. I think I didn’t express myself very well. I wanted to spawn Sub-Widgets on top of that map image on which the player can click and thus select the desired spawn location. But I think I got it. I’m going to post an answer to this.

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [August 20, 2021, 3:35pm UTC](https://forums.unrealengine.com/t/get-actor-position-inside-a-render-target-umg/487727/4 "2021-08-20T15:35:47Z")

</div>

Ok I figured it out.  
I basically divided the width of the spawn map image by the width of the viewport to get a multiplier by which I could modify the “project world to screen” coordinates of the 2d scene capture cam. I subtracted the excessive height (because the image is not the same ratio as the render cam) and used the values to modify the render translation.

 ![346803-bild-2021-08-20-172840.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/d/73db143cb1187986ba1de396fa1f7c802cf5c1a9.png)

 ![346804-bild-2021-08-20-172909.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/b/c4b6663e6f583dd27d93b36392fdc4ccdcea91e0.png)
