Skip to content

Lock the door once a puzzle is solved

Updated

When the puzzle is solved, a script snaps a door shut and locks every axis of its Handle; resetting the puzzle restores the Handle’s props.

Drag the door to swing it, then press Solve puzzle: it snaps shut and no longer moves. Press Reset puzzle to unlock it. Scroll to zoom.

Lock the door once a puzzle is solved

The script is explained step by step in Lock the door once a puzzle is solved.

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.

LockOnSolve.xrproj