Skip to content

Teleport

Updated

Point and teleport with an aiming arc.

Type
comp-teleport
Script class
TeleportComponent
Per entity
One
Version
3.0.0

Read about it in Teleport: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
distance 0.1 ≤ x ≤ 10000
slopeLimit 0 ≤ x ≤ 90

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • Teleport::start
  • Teleport::aim
  • Teleport::arrive
  • Teleport::cancel
  • Teleport::end

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(TeleportComponent);
if (component) log(component.props);
}