Skip to content

Spot Point

Updated

Marks a spot in the world that gameplay systems can find and send the player to.

Type
comp-spot-point
Script class
SpotPointComponent
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 "pin"
color "#38bdf8"
facing "align"
ocupable true
radius 0.5 0.001 ≤ x ≤ 100

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

  • SpotPoint::occupied
  • SpotPoint::release

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