Download

3D Widget that always faces the player camera

Hey guys,

I am using this bp:

5870-actor+faces+player+blue.png

to make a 3d widget always face the player camera.

The issue I’m having is that the 3d widget is always facing up towards the sky. I’ve tried everything I could think of but nothing is fixing the issue. Any suggestions to fix the issue?

Alternatively, Is there a way to make render a UMG widget to a material and then do something like this:

text_material.png

Which would always display it facing the camera? Beyond that it would need to appear and disappear based on the distance the player is from the enemy.

Hey guys,

I figured out my issue! After watching Tesla on Youtube I found his tutorial were he does this for a NPC and what I didn’t do was child the Widget to a Scene component and use that in its place to determine rotation. I used his set up in the tutorial and then added to it so that the widget doesn’t face the actor, but it faces the camera itself. Here’s a screen for anyone who’s looking for this type of thing and is unable to figure it out.

0879cf3b4bec61f15ce3883c73b933964f050217.jpeg

Thank you!

I am pretty sure that is a bad tutorial or possibly just UE4 does things now it didn’t do then. What you want to use is “Screenspace”, the setting for it is in the widget after you add it to an actor. This will keep the widget fixed on screen, always the same size (but not position). You won’t need any nodes etc.

Edit: I see original thread is years old.

I think the ideal result is making the widget fixed on screen with changing size and position base on the 3d object’s camera space position like health bar above charactor’s head, however i didn’t find a way to achieve that

NO WAY!
DO NOT USE TICK!! Screen Space is what you want, if you can’t see it after switching the space to screen you have to play the game in a new editor window (PIE) to see the widget! No ticking and repositioning/rotating at all needed here. Using tick is EXTREMELY inefficient! Especially for mobile games you clearly don’t want that.