- Home /
UI masking in a jet fighter HUD
Hello everyone,
so I am currently trying to make a fighter jet-like HUD.
Reference: F-16 HUD
Problem
The idea is that the UI (in my case with a canvas in world space) is only visible through a round "window" and not seen when I move from side to side, not looking through said window
Current state
I have provided an attachment showing my current test.
HUD frame (green)
Target (yellow)
Dot (red)
CullingArea (purple)
I have two cameras, one draws the scene, the other draws the UI on top. It works but the UI is painted over everything, even when not looking through the HUD frame.
Idea
I want the player to be able to only see the red dot (will be the UI later) through the Hud frame (green). The purple blocks shouldn't be visible, they only indicate where culling should occur and the red dot is not to be seen.
How can I tell unity to unity to only render the UI through a window in world space?
I am interested to read your approaches to this problem.
Thank you in advance