# A text that always rendered facing the camera

**URL:** <https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 15, 2014, 1:39am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604 "2014-04-15T01:39:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpcompany](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fpcompany](https://forums.unrealengine.com/u/fpcompany)\
**Post date:** [April 15, 2014, 1:39am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/1 "2014-04-15T01:39:30Z")

</div>

Hi!  
I want to make a text which will float above the actor. It must always face the player’s camera, it shouldn’t be visible through the level geometry. Also it should preferably be independent of distance (always the same size). It can be used various ways including NPC name display, damage numbers, dialog subtitle bars etc.

This blueprint does pretty much everything I need except it’s not independent of distance and also it gets affected by post processing (especially by annoying blur effect). HUD example objective text is seen through obstacles which is unacceptable.

 ![test.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/8/7847c5a7b8bf490de492bd98bb7ef016b40ceab4.png)

Any thoughts of improving/other ways to accomplish this? (C++ is fine too)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_69d98a0c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_69d98a0c](https://forums.unrealengine.com/u/anonymous_user_69d98a0c)\
**Post date:** [April 15, 2014, 2:19am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/2 "2014-04-15T02:19:33Z")

</div>

You could use a trace node to trace from the text to the player.

The trace will also let you control visibility.

This will give you the correct rotation to feed back into the text.

I’m not sure on the scale though, maybe base it of the distance between the player and the actor?

---

<div class="post-metadata">

**Author:** ![fpcompany](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fpcompany](https://forums.unrealengine.com/u/fpcompany)\
**Post date:** [April 15, 2014, 2:49pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/3 "2014-04-15T14:49:51Z")

</div>

Wait, where is the trace node located, is it a blueprint component? Also it still be affected by effects right?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8c742bcf1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8c742bcf1](https://forums.unrealengine.com/u/anonymous_user_8c742bcf1)\
**Post date:** [April 15, 2014, 11:31pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/4 "2014-04-15T23:31:51Z")

</div>

Search for trace in the palette of the graph mode, and you see a bunch of them. You can read about them in the Docs if you need to.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_69d98a0c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_69d98a0c](https://forums.unrealengine.com/u/anonymous_user_69d98a0c)\
**Post date:** [April 15, 2014, 11:36pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/5 "2014-04-15T23:36:49Z")

</div>

It’s a blueprint component, there are a few of them.

The “Single line trace for objects” does what i’m talking about. You will also want to “Break Hit results”

As an aside the UE4 devs just released this blueprint tut that uses this very node for a different purpose.

Hope that helps!

 ![traceNode.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/7/f75a7ba8253d32a540400ec56a2b225c8a4dfa2f.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8c742bcf1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8c742bcf1](https://forums.unrealengine.com/u/anonymous_user_8c742bcf1)\
**Post date:** [April 15, 2014, 11:41pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/6 "2014-04-15T23:41:30Z")

</div>

> [@cazblue;18224](#):
>
> It’s a blueprint component, there are a few of them.

To correct, those are not _components_, blueprint components are the ones that you can add in the components tab. The ones you use in the graph are generally called nodes, but these (traces) in particular are more specifically functions.

---

<div class="post-metadata">

**Author:** ![fpcompany](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fpcompany](https://forums.unrealengine.com/u/fpcompany)\
**Post date:** [April 22, 2014, 8:59am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/7 "2014-04-22T08:59:20Z")

</div>

I’ve made a font material which makes text face always to camera. Material set to ‘unlit’.

My font material:

 ![text_material.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/e/5e9c6f99db2b77ae1258727979bf1e9fb8c1ed65.png)

Result:

 ![result.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/5/45768e5d90f0259838431c4dc1400f439442bbf3.png)

Now looking at ‘ConstantScalebyDistance’ I would say that it can be used to make text always the same size. But how?

---

<div class="post-metadata">

**Author:** ![sidno](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sidno](https://forums.unrealengine.com/u/sidno)\
**Post date:** [February 13, 2015, 10:46pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/8 "2015-02-13T22:46:41Z")

</div>

> [@fpcompany;21350](#):
>
> …  
> Now looking at ‘ConstantScalebyDistance’ I would say that it can be used to make text always the same size. But how?

Were you ever able to figure this out? How can the material control the scale?

My desire is to have a min and max scale by distance on the text, where the closer you are the text stops scaling up and locks to a fixed max size, and when you are further away the text stops scaling down and locks to a fixed min size.

Can’t find any examples using this node. Seems promising though.

---

<div class="post-metadata">

**Author:** ![antondoe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antondoe](https://forums.unrealengine.com/u/antondoe)\
**Post date:** [June 22, 2016, 2:03pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/10 "2016-06-22T14:03:09Z")

</div>

Hi, You can control the scale by this way:

 ![constScale.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/f/1f8c1a5a987ef17d5500b4c17baa8358d2505736.png)

---

<div class="post-metadata">

**Author:** ![Psi0991](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Psi0991](https://forums.unrealengine.com/u/Psi0991)\
**Post date:** [June 24, 2016, 4:01am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/11 "2016-06-24T04:01:07Z")

</div>

> [@antondoe;552668](#):
>
> Hi, You can control the scale by this way:
> 
> ![constScale.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/f/1f8c1a5a987ef17d5500b4c17baa8358d2505736.png)

Hi antondoe,

Could you please provide a few more details as to how you achieved the constant scale? I don’t seem to be able to implement it.

Thank you for you help! 😃

Edit: I managed to implement the scaling by updating the scale in code every tick. I’m still curious about the way to do it in the material.

---

<div class="post-metadata">

**Author:** ![antondoe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antondoe](https://forums.unrealengine.com/u/antondoe)\
**Post date:** [July 21, 2016, 9:33am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/12 "2016-07-21T09:33:41Z")

</div>

Hi, sorry for late reply. this trick works for planes, that aligned to camera. it’s good for text. but doesn’t work for complex meshes. the idea beside is to offset each vertex in vertex pass towards a camera to make it be always on same distance to screen

---

<div class="post-metadata">

**Author:** ![mbelarouci](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mbelarouci](https://forums.unrealengine.com/u/mbelarouci)\
**Post date:** [July 21, 2016, 5:45pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/13 "2016-07-21T17:45:11Z")

</div>

You might find this useful (dropdown world-\>screen) - a widget component can be set to render in screen space:

![DZqe6JW.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/4/dd441729cd0b7066c2f206a530080517eb98c5b9.png)

---

<div class="post-metadata">

**Author:** ![Genova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Genova](https://forums.unrealengine.com/u/Genova)\
**Post date:** [November 14, 2016, 1:25am UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/14 "2016-11-14T01:25:37Z")

</div>

> [@mbelarouci;568597](#):
>
> You might find this useful (dropdown world-\>screen) - a widget component can be set to render in screen space:
> 
> ![DZqe6JW.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/4/dd441729cd0b7066c2f206a530080517eb98c5b9.png)

Geez, i totally overlooked that option. Thanks !

---

<div class="post-metadata">

**Author:** ![Flashback](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flashback](https://forums.unrealengine.com/u/Flashback)\
**Post date:** [January 17, 2017, 6:35pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/15 "2017-01-17T18:35:11Z")

</div>

@fpcompany great idea, but have you tried rotating base actor around Z axis in the world? It makes text go upside-down at 180 degrees.

---

<div class="post-metadata">

**Author:** ![fpcompany](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fpcompany](https://forums.unrealengine.com/u/fpcompany)\
**Post date:** [April 5, 2017, 3:35pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/16 "2017-04-05T15:35:47Z")

</div>

> [@Flashback;652599](#):
>
> @fpcompany great idea, but have you tried rotating base actor around Z axis in the world? It makes text go upside-down at 180 degrees.

Hi there  
Sorry for not being able to answer for so long, havent log in for awhile  
First, I now use the ‘3d widget’ with text inside to display NPC names because it does not get affected by post processing, lighting etc.  
Next, on actor’s tick I set widget’s world rotation to camera’s world rotation and then I add local z-180 degrees.

---

<div class="post-metadata">

**Author:** ![OptimisticMonkey](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/optimisticmonkey/32/906571_2.png) [@OptimisticMonkey](https://forums.unrealengine.com/u/OptimisticMonkey)\
**Post date:** [April 5, 2017, 3:42pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/17 "2017-04-05T15:42:56Z")

</div>

> **[Creating 3D Widgets](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UMG/HowTo/Create3DWidgets/)**
>
> Create an interactive 3D menu that appears in the game world instead of 2D screen space.

---

<div class="post-metadata">

**Author:** ![Sojiro59](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sojiro59](https://forums.unrealengine.com/u/Sojiro59)\
**Post date:** [April 18, 2025, 12:39pm UTC](https://forums.unrealengine.com/t/a-text-that-always-rendered-facing-the-camera/2604/18 "2025-04-18T12:39:28Z")

</div>

Someone gave a good exemple: [https://www.youtube.com/watch?v=\_iuuq-nE6FA](https://www.youtube.com/watch?v=_iuuq-nE6FA)

I did this that gave good result.  
You have to refresh it so it can follow your movement, you can either do a “Tick” or as I did, a “Timeline” so I can make it moves upward progressively as well.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/f/9afb02169db46b41685800e5340f7eaed3ffa88b.png)
