Function: createXRBlocksWorldSensing()
function createXRBlocksWorldSensing(world: XBWorldLike, options?: WorldSensingDirectorOptions): XRBlocksWorldSensingSetup;
Defined in: xrblocks-environment/src/index.ts:103
Wire a world-sensing director to XR Blocks' world module.
const { director: world } = createXRBlocksWorldSensing(xb.core.world, {
detection: { planes: true, meshes: true },
});
Planes and meshes come from XR Blocks' own detectors, which have to be enabled in its options before init. Anchors and hit testing are reported as unsupported: XR Blocks places objects for you rather than answering where a ray lands.
Parameters
| Parameter | Type |
|---|---|
world | XBWorldLike |
options | WorldSensingDirectorOptions |