GamePlay on UI widget?

I’ve had so much luck on this forum so far I figure I’ll take a swing with this question because I can’t find much online about this one. In my game there are sections where the player needs to destroy 2D actors as they scroll by on the bottom of the screen. I have this working currently by spawning the actor sprites in the actual word but what I’d really like is for the whole thing to happen on a UI widget that appears and disappears as its needed. Does anyone have any thoughts on how this can be done?

Why would you do it in the Widget? There is no logic. You can always show and hide sprites as needed be. Widget is not an Actor, and therefore, you would have to invent a tons of wheels in order to create any gameplay in the UMG. Just use sprites. You can load it and unload it using level stream if needed be.

Ah yeah that makes sense. The reason I wanted to use it as a widget is so that it overlayed on the viewport vs being spawned in to a location in the world, but it may not be the way to do it. It’s a little weird maybe because its a 2d game play element in an otherwise 3d world.

Not sure if this what you mean but Bojan is current and it shouldnt be in a user widget, i think maybe ProjectWorldToScreen might help with what you want if I understood correctly.

This is the docu on it:

Ah interesting. I’ll look in to this. Thank you!

1 Like