# How to spawn widget at actor location?

**URL:** <https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 25, 2022, 7:30pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342 "2022-08-25T19:30:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![oAnubus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oanubus/32/551838_2.png) [@oAnubus](https://forums.unrealengine.com/u/oAnubus)\
**Post date:** [August 25, 2022, 7:30pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/1 "2022-08-25T19:30:18Z")

</div>

I got my widget to spawn when my character has come close to my statue actor but i want it to spawn at the statue actors location. Any tips or nodes to use?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/2/702089914a3773f4ebb79916542b08150cbeabb7.jpeg)

---

<div class="post-metadata">

**Author:** ![c0r37py](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/c0r37py/32/559700_2.png) [@c0r37py](https://forums.unrealengine.com/u/c0r37py)\
**Post date:** [August 25, 2022, 8:31pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/2 "2022-08-25T20:31:24Z")

</div>

you can learn it here, [YouTube Survival Course](https://www.youtube.com/c/ReubenWardTutorials/search?query=widgets)

* * *

hope it helps  
cheers!

---

<div class="post-metadata">

**Author:** ![Supremative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/supremative/32/906564_2.png) [@Supremative](https://forums.unrealengine.com/u/Supremative)\
**Post date:** [August 25, 2022, 8:41pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/3 "2022-08-25T20:41:23Z")

</div>

You can add collision to your actor, and when colliding, spawn the widget.

 ![CreateWidgetInDesiredPosition](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/f/d4f1f61d40e911a13c3d0370353cdee96d37f059.png)

[My Products](https://www.unrealengine.com/marketplace/en-US/profile/Aleksandr+Sidorov)

---

<div class="post-metadata">

**Author:** ![oAnubus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oanubus/32/551838_2.png) [@oAnubus](https://forums.unrealengine.com/u/oAnubus)\
**Post date:** [August 25, 2022, 10:50pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/4 "2022-08-25T22:50:03Z")

</div>

This works but it spawning on my character instead of the statue. When I try to attach my statue BP reference to “Get Actor location”, I get this message:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/c/a0c131fd1e4d55beb336a651d586da5ccd0d0060.png)

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [August 25, 2022, 11:07pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/5 "2022-08-25T23:07:51Z")

</div>

it might make sense to have the widget be a component on the save game actor.

you can add a widget in the components panel and set its position manually in the viewport. Then just toggle its visibility from an overlap event.

---

<div class="post-metadata">

**Author:** ![L.F.A](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l.f.a/32/1194525_2.png) [@L.F.A](https://forums.unrealengine.com/u/L.F.A)\
**Post date:** [August 25, 2022, 11:22pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/6 "2022-08-25T23:22:10Z")

</div>

Hi there,  
You can add a widget component to your statue actor and toggle its visibility on begin/end overlaps

---

<div class="post-metadata">

**Author:** ![oAnubus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oanubus/32/551838_2.png) [@oAnubus](https://forums.unrealengine.com/u/oAnubus)\
**Post date:** [August 26, 2022, 1:54am UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/7 "2022-08-26T01:54:37Z")

</div>

Thanks to @Supremative @L.F.A @BIGTIMEMASTER this is what i did and needed:

-I set the space tab to screen because it looked more like a UI  
-I set the widget class to my interact button widget (SaveGameButton\_widget) and you would have to adjust it into the viewport.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/e/9cea8151780431706f840f765ecd1ecd18209037.jpeg)

-I added a sphere collision and then casted to my main character so when i overlap the sphere, it toggles the visibility of the interact widget  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/1/f6107125bfe29f456b7a58813e8f22ed7539ee10.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/b/1ebadcc099e4cc2bf881b8f00c73724f5e1f45ee.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/2/50247d9cfecc5bcf01c4ff1d7284104393659294.jpeg)

Finally, to get the widget to follow the camera:

-I made 2 custom events, one that updates the rotation and the other that shows how long it takes per update

- From Event Beginplay, search set timer  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/9/e99c8c7a811f87b215cdec6a2b274214999f055b.png)

This should be the end result:

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/5/d252dfe484ce8be062eae7fbced2ab6311576bab.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/5/d252dfe484ce8be062eae7fbced2ab6311576bab.mp4)

---

<div class="post-metadata">

**Author:** ![L.F.A](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l.f.a/32/1194525_2.png) [@L.F.A](https://forums.unrealengine.com/u/L.F.A)\
**Post date:** [August 26, 2022, 2:03am UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/8 "2022-08-26T02:03:10Z")

</div>

> [@oAnubus](#):
>
> Finally, to get the widget to follow the camera:
> 
> -I made 2 custom events, one that updates the rotation and the other that shows how long it takes per update
> 
> - From Event Beginplay, search set timer

Great to see you figured that out. But, is this timer really necessary? Because you set the widget to screen mode, it should follow the camera. Anyways, keep up the good work.

---

<div class="post-metadata">

**Author:** ![oAnubus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oanubus/32/551838_2.png) [@oAnubus](https://forums.unrealengine.com/u/oAnubus)\
**Post date:** [August 26, 2022, 2:11am UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/9 "2022-08-26T02:11:49Z")

</div>

For my case no, but if someone was doing a different type of project and they set the space to world and wanted it to look like the picture below, then it would be necessary others wise the widget wont follow the camera. Also, only setting “Update Rotation” (Custom event) will make the actor face anything except the camera.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/a/60a96994c8ef8eb9c89d40a986ef1737cd2b7b46.jpeg)

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [August 26, 2022, 1:26pm UTC](https://forums.unrealengine.com/t/how-to-spawn-widget-at-actor-location/634342/10 "2022-08-26T13:26:30Z")

</div>

great, thanks for posting the result.

Like mentioned, for something to face the camera, in many cases I think doing that at the shader will be a little easier and more performant. But it’s good to know both ways.
