Widget Troubles

I currently have a Widget for ground items. I have the Widget Space set to Screen but I dont want it to display on top of the player character.

Is there a way to have the widget display like a 2d widget (Widget Space set to Screen) that turns to face the player camera but keep its 3d world space? Or a 3d widget (Widget Space set to World) that can rotate to face the player camera? If that makes sense.

You did not disclose how objects are detected (line trace, mouse click, proximity, some other method?) so it’s pretty much impossible to advise on the best way to do it but consider this generic approach:

  • the widget belongs to the player, is in Screen Mode, is not visible, and its transforms are set to Absolute
  • using a crude overlap here, we detect a nearby object and place the widget component at its location + desired offset.

Image from Gyazo

This can be set up much better if we knew how things are supposed to work. Inheritance and / or interface for comms would work well.

Sorry, I currently have it setup using a begin and end overlap with the player capsule.

There is an interface setup to deal with entering and exiting the capsule collision.

But, back to my question. After thinking it over, I think I would have to set the “Set Widget Space” to “World”. This would make it display as 3D in the world verse 2D if it was set the “Screen”.

344771-ba5.png

That would solve the issue of the widget displaying over the player chacater. But Now I need to figure out how to make the widget rotate to look at the player character, and not the player camera. right now it doesnt rotate at all and when looking at it from the back it is invisible. When I have time I’m gonna look more into this. Thought I’d post to see what other people thought. :slight_smile:

While im sure there is a better way to do it, I now have it set to rotate to face the player character while overlapping.