Floating Damage Texts

Hi everyone, I just released a new product Floating Damage Texts](Floating Damage Texts in Blueprints - UE Marketplace) on the Unreal Engine Marketplace. It is a blueprint system for adding floating texts to display damage information in your games.

Showcase Video:

You can create new types of Damage/Damage Modifier texts & customize your Text Color, Font-Family, Font Size, etc directly from the Editor.

Also available are the options to add Text Pop-Up as well as Distance-based Scaling of texts relative to your player camera location, both customizable through a custom Scale Box widget.

Floating Damage Texts support both Linear and Parabolic trajectories for your texts with options to customize Path Traversal Time, Curve Sharpness, Path Distance, and more!

Features:

  • Linear & Parabolic Paths for Floating Texts
  • Set your own Text Color, Font-Family, & Font Size
  • Easy to Integrate with support for In-Editor customization
  • Add Pop-Up Effect & Distance based Scaling for your texts
  • Control text trajectories through customizable parameters
  • 2D widgets instead of in-world 3D widgets for better performance
  • Example content showcasing multiple types of damage texts for both Projectile & Hitscan damage
  • Fully commented blueprints

Documentation: https://docs.google.com/document/d/1…vsyI2MkwsFLlA/

If you have any queries or feedback, you can always reach out to me personally through the Support Email.

The v1.1 update has been submitted to the Marketplace.

New Features:

  • Added support for Text Fade. The “TextBlock_FloatingText” widget now has additional logic to have the texts fade out over time. You can use its instance editable variable %TimeToBeginFadeOut to control when the text should start fading out.

Additional Notes:

  • Search for Version1_1 in the blueprint editor to identify the new changes in this update.

Hello! I’ve been trying to get this to work in my game but have been unsuccessful. When you set it up in enemy blueprint, where is the set floating text spawner coming from? I’m pretty new, so I’m sure it’s something simple.

I really want to get this working. Am I creating a new variable called Floating Text Spawner in the enemy class as the BP_FloatingTextSpawner reference?

Thank you!

Hi there, yes that’s a new variable that you can create by dragging the pin out of the Get node and selecting Promote to Variable. Alternatively, you can just use the Get Actor of Class (since we have only one floating text spawner in the level) node and create a variable from its return value as shown below:

The v1.2 update has been submitted to the Marketplace.

Change Log:

  • Added support for displaying floating texts in Top-Down/Isometric camera perspectives. Here is a preview of it working in my Wave Spawning System template:

    https://youtube.com/watch?v=l9Tg3iLlYYA

  • Updated to Unreal Engine 4.26.

Additional Notes:

Hey! So I love the product, I am having some issues implementing it though, I am a little confused what I am doing wrong, as far as I can understand I have followed steps 1, 2 and 3, applying them to my enemy, however, the floating text is not appearing, I am wondering if I am supposed to include the calculate damage function included in the testDamagePawn Blueprint? (maybe that is what I am doing wrong?)

Also you can’t see in pic but the get all actors sequence is attached to EventBeginPlay as instructed

also wanted to point out that i am using line trace for my hit interaction

Quick Update: I found the further notes on integration section and tried the method of connecting a getPlayerController node directly to the spawn Floating Texts within the Floating Text Spawner BP to test if it was working, i found that even with the player controller hooked directly to it, the floating texts are still not appearing.

Hi Smumpy, thanks for sharing your screenshots. Everything seems fine on that front. And don’t worry about the Calculate Damage function. I just added it as a simple example for dealing with texts for multiple damage types and modifiers like critical hits. So you can go ahead and use the logic you already have in your BP.

Now since the texts are not spawning at all, I’m guessing that it might be due to the following Player Controller validation check failing at the start of the Spawn Floating Texts function.

So could you try passing the Get Player Controller node when calling the spawn function from your **AstralWardenBP **like this:

If that works, we can try to pass it through Instigator to it and thus ensure that damage is shown only if the player was the instigator.

Hey so I set it all back up with the Get Player Controller set as the instigator on the Spawn node, I am getting a “accessed none when accessing the Floating Text Spawner object reference” which is odd because it is being set on BeginPlay. Thanks for getting back with me so fast!

Alright, if you have the Astral Warden placed in the level from the editor, there is a chance that Unreal might be initializing it before the Floating Text Spawner actor. Could you add a Delay node with say 1 second interval at the start of its Event Begin Play before calling the Get All Actors of Class node? This will let us know if it’s an issue with initialization order.

The v1.2.1 update has gone live on the Marketplace.

Change Log:

I. Added an option to set if the Damage Instigator should be validated before spawning the Floating Texts. I’ve noticed that not everyone is familiar with the concept of passing in an Instigator when applying damage. So I’ve turned off the validation by default to ensure that texts will always be spawned as long as the “SpawnFloatingText” function is being called.

However, if you’re already familiar with using Instigators, I’d definitely recommend turning on the validation by setting the “bValidateInstigator” variable in “BP_FloatingTextSpawner” to “True”. This will help you ensure that damage texts are displayed only when it is instigated by a player, and not when it is caused by say something like friendly fire between enemy AI.

Hi. If I wanted the text to be displayed just slightly higher (above enemy head for ex) what should I tweak? Been looking at the pop up functions, but unsure. Thx

Hi there, you can do that by increasing the z value of the Spawn Offset parameter when calling the SpawnFloatingText function.

Unreal Engine 5.1 has introduced either a new bug or some intended code changes to the “Set Position in Viewport” node which essentially makes it unusable at this point. You can follow other reports of this issue here: set position in viewport widget not working

The Floating Damage Texts rely on the aforementioned node to update the position in the viewport during its motion, and as a result, don’t work as intended in UE5.1 (works perfectly fine in previous versions including 5.0). Since we have no way of knowing if there will be a fix in the near future, I’ve decided to make add my own fix to the product.

Edit: The update has gone live on the Marketplace. I’ve also tested it in 5.2 and the new solution seems to be working quite fine. The 5.2 edition has been submitted to the marketplace team and should be available on the Marketplace soon.

I’m assuming this is why there is now a delay in BP_FloatingTextSpawner’s BeginPlay. Unfortunately this causes another problem: spawning floating texts right away causes an “accessing None” error. There is a comment on the delay saying “Wait for viewport to initialize”, though removing the delay seems to work fine for me. Just wondering if there is something I’m missing (eg. potentially it being a problem on other platforms) or if it’s just really to avoid initialization order problems. :slight_smile: