Skip to content

Peephole or hole: toggle on click

Updated

Clicking the portal’s frame flips its Mask Mesh’s invert: a window that shows another world inside the ellipse becomes a hole that shows it everywhere else.

Click the blue frame to turn the window into a hole, and again to turn it back. Drag elsewhere to orbit the camera, scroll to zoom.

Peephole or hole: toggle on click

The script is explained step by step in Peephole or hole: toggle on click.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

PortalInvert.xrproj