XR Planes
Updated
Shows detected real floors, walls and tables.
- Type
comp-xr-planes- Script class
XRPlanesComponent- Per entity
- One
- Version
- 1.0.0
Read about it in XR world: what it does, how to use it from a script, and examples.
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
XRPlanes::detectedXRPlanes::updatedXRPlanes::lost
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Count the tables in the roomCounts the real tables an AR device detects from the XR Planes events, and emits the count on hud/tables for a HUD to show.
This one needs AR: in a headset or AR phone that labels planes, each table found raises the count. On a desktop no planes are detected.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(XRPlanesComponent); if (component) log(component.props);}