Skip to content

A radio you switch on

Updated

Click a radio to switch its music on and off; while it plays, it drives 10 m away and back, and the music fades to silence and returns: a Positional Audio with a linear fade under a Selectable mesh, played and paused with its trip by a Behavior script.

With your sound on, click the radio: the music fades to silence as it drives away and comes back as it returns. Click it again to stop both.

A radio you switch on

The script is explained step by step in A radio you switch on.

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.

RadioSwitch.xrproj