# How to calculate screen coordinates of a character ?

**URL:** <https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [October 2, 2024, 2:35pm UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835 "2024-10-02T14:35:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GMG\_ES](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GMG\_ES](https://forums.unrealengine.com/u/GMG_ES)\
**Post date:** [October 2, 2024, 2:35pm UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/1 "2024-10-02T14:35:18Z")

</div>

Hello,

I’m trying to implement damage indicators for my game in UEFN .  
I want a ui text to pop out when I damage an enemy, above such enemy.  
To do that I think I need to calculate the on-screen position of the enemy character, but I have not found anything to do that so far.  
Does anybody have any hint or info about how to achieve this?

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [October 2, 2024, 7:54pm UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/2 "2024-10-02T19:54:10Z")

</div>

You could do that but you’ll need to use Verse UI afterwards to display the damage, which means being limited to 30fps (when the server doesn’t lag)

I think you’ll be better off spawning a 3D prop with a **sprite material** that samples the **cube scale’s decimals** to display the correct number, it’s a commonly used technique and it works fine

Also, I don’t think you’ll be able to remove the **default Fortnite damage HUD** , maybe you want to double check that

NOTE: If you want the damage numbers to only show up for the damager player it’s gonna be a bit harder, maybe there’s a way to do it with switches

---

<div class="post-metadata">

**Author:** ![GMG\_ES](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GMG\_ES](https://forums.unrealengine.com/u/GMG_ES)\
**Post date:** [October 3, 2024, 10:29am UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/3 "2024-10-03T10:29:40Z")

</div>

We already have the whole thing implemented in Verse UI , framerate is not an issue since it’s barely animated, and someone else took care of the default FN damage HUD.  
I only need a way to properly position the UI elements on screen.

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [October 3, 2024, 11:50am UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/4 "2024-10-03T11:50:25Z")

</div>

I wasn’t talking about animations but rather keeping the damage HUD positioned on top of the damaged character since the damager player can move its camera

I can’t share you any method to do that unfortunately, and there’s no native way of retrieving it

---

<div class="post-metadata">

**Author:** ![GMG\_ES](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GMG\_ES](https://forums.unrealengine.com/u/GMG_ES)\
**Post date:** [October 3, 2024, 4:08pm UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/5 "2024-10-03T16:08:09Z")

</div>

Then seems like we need to change everything to use 3D props instead 😃  
Thanks for your help @im_a_lama

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 2, 2024, 4:09pm UTC](https://forums.unrealengine.com/t/how-to-calculate-screen-coordinates-of-a-character/2049835/6 "2024-11-02T16:09:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
