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.
Properties
Section titled “Properties”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. |
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
SpotPoint::occupiedSpotPoint::release
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Seats on spot pointsThree spot points act as seats: clicking a marker travels there and reserves it, and a script counts the occupied and release events they share on one signal.
Click a seat marker to sit there, then another. Watch the script log.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(SpotPointComponent); if (component) log(component.props);}