How to Keep a Cube Fixed in Front of the Viewport?

How do I keep an object in the world at the same 2D location in front of the viewport with always the same side facing the viewport? You know, like a widget, except that it is actually in the level as an object? I think there must be a way probably much easier than I thought, perhaps I just don`t know for now. Thanks in advance!

yes, I think it’s fairly straightforward… you can attach it as a child component (like, let’s say it’s a static mesh) to the camera you are using… so whenever the camera moves, the child component will move with it.

Oh, thank you! I wasn`t actually turning around with this question, instead just thinking about how to employ some certain maths behind it, silly me. Really solved the problem, thank you for letting me see the way around it from another angle.