Skip to content

Tilt a board, with a keyboard fallback

Updated

A board tilts with the phone through Input.accelerometer; on a desktop, where no reading arrives, the arrow keys tilt it instead.

On a desktop, click the scene and hold the arrow keys. On a phone, press Motion, allow motion access, and tilt the phone. Drag to orbit the camera, scroll to zoom.

Tilt a board, with a keyboard fallback

The script is explained step by step in Tilt a board, with a keyboard fallback.

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.

TiltBoard.xrproj