How to spawn widget at actor location?

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?

1 Like

you can learn it here, YouTube Survival Course


hope it helps
cheers!

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

My Products

1 Like

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

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.

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

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.

-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


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

This should be the end result:

2 Likes

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.

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.

1 Like

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.