create_spatial_anchor
Create spatial anchors that persist across sessions and maintain real-world positions by specifying world coordinates or attaching to detected planes. Supports cloud sharing and custom metadata.
Instructions
Creates a spatial anchor at a specified position or on a detected plane. Spatial anchors persist across sessions and maintain their position in the real world.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | Custom key-value metadata to store with the anchor | |
| position | No | World position for the anchor | |
| rotation | No | Rotation quaternion for the anchor | |
| anchorName | Yes | Unique name for this spatial anchor | |
| persistent | No | Save anchor for persistence across sessions | |
| planeOffset | No | Offset from the plane center when attaching to a plane | |
| cloudEnabled | No | Enable cloud sharing of this anchor | |
| attachToPlane | No | ID of a detected plane to attach the anchor to |