Skip to content

A sweeping searchlight

Updated

A searchlight sweeps left and right with a visible beam, which flares when you press F: a Spot Light with a Spot Light Beam, turned by a Behavior script under it.

Watch the beam sweep, and press F to flare it (click the scene first so it has the keyboard). Drag to orbit the camera, scroll to zoom.

A sweeping searchlight

The script is explained step by step in A sweeping searchlight.

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.

SweepingSearchlight.xrproj