createAnchor
Declaration
func createAnchor(at pose: simd_float4x4) throws -> NSDKVpsAnchorId
Summary
Returns
A unique identifier for the created anchor.
Throws
NSDKError.invalidOperationif the localization is not in.precisestate.
Parameters
| Name | Type | Summary |
|---|---|---|
| pose | simd_float4x4 | - |
Requests to create an anchor at the specified pose.
Creates an anchor relative to the currently tracked location, and begins tracking (no
need to call
trackAnchor(payload:)). The payload for the new anchor will not beavailable immediately — the session polls for it each frame and fires
createdAnchorPayloadonce it becomes ready.- Attention: Anchors can only be created when the current localization's tracking state
is
.precise. Use$latestLocalizationto observe tracking state.