An intro cutscene
Updated
A cutscene camera flies a Motion Path once; the script cuts to it with CameraDirector, then cuts back to the main camera when the path’s end arrives on a filtered signal.
Watch the fly-around, then drag to orbit the camera once control comes back.
An intro cutscene
#pragma lifecycle(startup)
let path;let player;
function startup() { path = findEntity('Cutscene Cam').getComponent(MotionPathControllerComponent); player = CameraDirector.main?.getComponent(CharacterControllerComponent);
once('cutscene/done', () => { CameraDirector.switchToMain(); player?.setEnabled(true); }); player?.setEnabled(false); // the player stands still during the intro CameraDirector.switchTo('Cutscene Cam'); path.play();}How it works
Section titled “How it works”The script is explained step by step in An intro cutscene.
Open it in XR Creator
Section titled “Open it in XR Creator”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.
IntroCutscene.xrproj