Hiding a portion of a GUI from the player

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a realistic holographic scope.

  2. What is the issue? Include screenshots / videos if possible!
    If the reticle is not within the bounds of the glass, I don’t want it to show, and if the retical is a decal I want only the portion of the decal within a given boundary to show, and the portion of the decal outside of a given boundary not to show. (See picture below)

  3. What solutions have you tried so far?
    I’ve tried finding ways to only show a given portion of the GUI but I cannot find anything.

Here is a drawing of what I mean

Phantom forces does it so its probably possible, but they might break the decal into a bunch of parts.

image

(it was a little hard to get a screenshot that shows it well but if the sight weren’t hidden somehow it would be poking out of the other side)

So how can I (if it’s possible) hide a part of the GUI if it is outside of a given boundary?

Thanks!

image

Enable this property in the frame the UI instances are contained inside.

1 Like