Teleport range that grows
Updated
A script gives the player camera’s Teleport a short green arc, counts the arrive events, and extends the range after five teleports.
Hold the right mouse button on the floor to aim, release to teleport. Left-drag to look around.
Teleport range that grows
#pragma lifecycle(startup)
let hops = 0;
function startup() { const teleport = self.parent.getComponent(TeleportComponent); teleport.setProps({ distance: 10, color: '#a3e635' });
on('player-cam', (event) => { if (event.eventType !== EventType.Teleport.Arrive) return; hops += 1; if (hops === 5) { teleport.setProps({ distance: 30 }); emit('hud/toast', { text: 'Teleport range increased!' }); } });}How it works
Section titled “How it works”The script is explained step by step in Teleport range that grows.
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.
TeleportRange.xrproj