Widget TypeWriter Align Right

Hello,
I have only a Text in a Widget, I add this widget in a blueprint (Widget component). I want to attach or Align the text by his right, but, more, I clamp the Text to Write or Unwrite like typewriter. Like my text is attach on the right, when I clamp one letter, letters who are staying from this text move right to stay align on the right.

I was looking for how I can get the size on my text (or my widget component in BP) ?

My idea is to leave the alignment left, get the size of the widget component and move it to align right. But how can I get this widget Size (The size of it is setup on desired)

Thanks for your help
JD

Hey again @JDARRAS!

Is this possibly what you’re looking for?

Eh non, too simple !
Imagine, you are using typewriter with this fonction in the widget :

If you are align left, no problem !
But if you align right, when you start the typewrite, this one is not going from right to left but from left to right because when your word is loosing one letter, what is staying move on the right to stay align !

I want that my text desapear in typewriter. But when the word is full, it’s align right. So I think to get the size ou bound of my text and move it to align right.

How can I get the size of my full text ? Or like I use Desired “Layout” :

How can I get the size of my widget component ?

Thanks for your help !
JD

Hey JD!

So are you saying you want the text to align left before a word is finished and align right once it is completed?

This should help with your desired size! You just have to check that it is valid FIRST with an IsValid node.

Yes this is working, I missed to add delay.
It’s stay one problem, my widget is not visible at the beginning and when it’s hidden, the value returned is 0.0.0.
I will hide what alpha in render tint Color and opacity.
What I don’t understand, it’s why when I put this in the widget blueprint directly, it return 0.0.0. How the Widget BP knows if it’s visible or not.

Hey again JD!

So it’s going to always return 0.0.0 if it’s hidden, because what is returning is the current data. Since it’s unseen, it’s 0. When you un-hide it, does it correctly return to it’s original color?

Thank Mind-Brain for your help,
I didn’t hide the component widget but reduce to 0 the alpha and it’s working !
Great, I will show you my BP and the widget BP soon …

Awesome! Can’t wait to see it. I’ve been very curious what you are using this code for!

Hi Mind-Brain,

The production is the 12 of November. I will post the result here after !

@Mind-Brain
OK so, first, I get my text from datatable :

My texte in widget blueprint component :

I have empty cause the texte appear with Y rotation :
image

The widget component détails modifications :

Now the Widget BP, easy :

Here I receive the data, do unwrite for the end animation and rescale the text if it’s too long

On event begin play, I hide the texte using alpha, not visible

I have a refresh Data buton where I need to align my text “prenom3” and “nom3”

On the play buton, you can image, in put the alpha at 1
image

On the end buton, I do my unwrite and after hide with alpha

It’s Done
Only problem if it’s the camera don’t see the BP in the scene, the line will not be align correctly. I would like to disable the culling option of the render engine. Do you know how I can do this ?

You’ve put a lot of work into this!

To disable occlusion culling you open your Project settings, then it will be under:

Engine

Rendering

Culling (checkbox)

Do you mean the option “occlusion culling” ? If I uncheck this option and I play the scene when the camera don’t see the blueprint. The length of the line is 1. I try to add an PrecomputedVisibilityOverrideVolume and put my blueprint in the list of “override Visible Actor” but it’s not working.

Hey again!

Are you wanting one specific thing to be hidden and the rest NEVER hidden?

I’m not sure what it is you’re asking for. :frowning:

Vous parlez français, oui?
Mon français n’est pas très bon, mais je peux peut-être comprendre si vous demandez en français!

Hehe,
I made this project for TV and once, the camera was in front of the object or if you prefer, the object was behind the camera = The camera was not looking at the object in its viewing angle. The culling caused my AR object to be masked which means it couldn’t calculate the length of the line. I tried to deactivate the culling option so that my line of text is always visible and always calculated but I did not succeed.

Une fois, la caméra était devant l’object ou si tu préfères, l’objet était derrière la caméra. La caméra ne regardait n’avait pas l’objet dans son angle de vision. Le culling a fait que mon objet en RA était masqué ce qui veut dire qu’il ne pouvait pas calculer la longueur de la ligne. J’ai cherché à désactiver l’option de culling pour que ma ligne de texte soit toujours visible et ainsi toujours calculée mais je n’y suis pas parvenu.

Merci pour ton aide
JD