I need to mask text but it fails at random positions

Hi guys, please check this github issue. I need to mask text elements but the text disappears at random positions. Is there a workaround, or am I doing something wrong? Or an alternative way to mask text elements? Thanks!

Hi @Marks! It steems that the problem is related to the height of the text element. Is there a reason why this is 30.11? Can you please check the result with a height of for example 300?

It worked…can you explain to me what is the relation of the text height with the mask? What is the minimum height the text needs to be for the mask to work? And why does it show up correctly in the editor but not when playing? Thanks…

If the height of the text element is smaller than the actual amount of text, then the text element already prevents the text from being visible.

All text need to be inside the text element. So more text need a higher text element.

I don’t think it shows correctly in the editor. I would call this a bug.

Ok thanks for the explanations…

1 Like

Please see my response in the GitHub issue. https://github.com/playcanvas/engine/issues/4615#issuecomment-1236090705

I can’t see any issue with the original project. It looks like there’s a misunderstanding on where and how large the mask is.