There are two main approaches you could take:
-
Use GUI stencils. Set up the stencil mask and make the text a child to it. This will make the child move along when you animate the mask so you need to compensate for that motion. Unfortunately there is no
gui.get_world_position()that would make that easy though. (there’s an issue to add that to the gui API - DEF-566) -
The other approach is to create the masking yourself with custom rendering. Check out this thread for some leads: Making a "flashlight"