How to get bounding box of Text 3D?

I’m trying to find out the way to change background cube size for the foreground 3d text.

Just in order to keep back plate for the text with certain size of the current text.

Is it possible to get actual bounding box from Text 3D?

.

Just tried this and it does live up to its Experimental name in 4.25.3 - super crashy.


Anyway, it seems to operate by creating a bunch of static mesh components under the hood, so Get Actor Bounds seems to work well here:

Thank you!

Yes, “Get Actor Bounds” works, but only I have to separate my text and background cube into two different actors… I need to have both of them in one single actor. Is it possible? Or I have to use socket?

Unfortunatelly, I can’t use “Get Component Bounds” for text. It doesn’t work. This provide ONLY position, but BBox is empty (0,0,0).

It was the reason why I started this topic.

Not sure how much improvement this has seen in 4.26. Barely works in 4.25, kind of hard for me to chip in much.


You should be able to attach actor to actor with script and then get bounds. Whether you use a socket for this is optional

336558-screenshot-1.png

You can also Get Component Bounds (of text) and apply it to something else.

How about a Child Actor then:

This should not be on Tick, obvs. :slight_smile:

This thing cracks me up. :smiley:

Wow! This is looking just what I want! Let me check how it works in my special version UE…

I’m experienced with real-time graphics but I’m newbie in UE. So, for me some question not so obvious.

Could you say what is this “converter” node?

It’s not a converter. It’s a getter but the default naming conventions here are not the best that’s why this thing can be somewhat confusing:

The Child Actor on the far left is a Component, it automatically spawns an actor of Child Actor Class (here ActorA) and controls its lifespan. If the component is destroyed so is that ActorA. And that Child Class can be replaced, run time, too.

Imagine creating a highly customizable robot that can have various attachments. Instead of manually stitching actors together, you can do it with Child Actor Components instead. And the player will decide what Leg, Arm, Head, Weapon actor will sit in that Child Actor Component slot.


In this case, the bottom Child Actor is the Component that holds onto the 3d Text Actor, and the top (unfortunately named) Child Actor node is the actual 3d Text Actor.

It’s probably not the worst idea to rename the lot:

Apologies for the confusion.

My posts are being moderated, if my answer does not show up in a couple of days, ping me @dudintv

Short version as I don’t feel like retyping a wall of text again :slight_smile:

Thank you very much for trying to help me!
But I still don’t understand only one thing. How do you connect This Child Actor to “Get Bounding Box”? What is the node you use between ChildActor and GetBBBox? It’s not obvious to me.

I see you use something between. But it’s not obvious on these screenshots :frowning: Tried many times to find this by brute force, but I didn’t find anything suitable.
What should I type in when adding a new node to the blueprint?

Drag a wire from Child Actor and search for Child Actor. I know.

Image from Gyazo

1 Like

The Child Actor you see in the component list is just that - a component. You need access to the actual actor it holds, as seen above.

Thank you for your patient help!
I did it and it works :slight_smile: Finally!

Wow! Thank you for the amazing explanation! Now it’s crystal clear.

Hi, can I ask you please one more question?

I came across one issue with changing Text3D text. The proccess of updating the Text3D object is pretty long. And the “update bg” function doesn’t wait when the size of Text3D in I put them in one line. In other words, when I try to change text and right after that I run “update bg” function — this functions doesn’t work properly, because it launches before the moment when the Text3D object was updated. To avoid this, I have to put “update bg” function in every Tick. I think it’s not good for performance.

I’m just wondering, is there some approach to change bg size only after text was changed? Specifically in Editor Mode, because “Delay node” is not working (it seems like this).