Skip to content

Travel Point

Updated

Walking into an in portal sends the player to an out portal of the same channel.

Type
comp-travel-point
Script class
TravelPointComponent
Per entity
One
Version
2.0.0

Read about it in Spot and travel points: 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
appearance "portal"
channel "main"
color ""
port "in"
radius 0.6 0.001 ≤ x ≤ 100

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

  • TravelPoint::enter
  • TravelPoint::arrive

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(TravelPointComponent);
if (component) log(component.props);
}