Skip to main content
←API Reference ←com.nianticspatial.nsdk.vps2 ←Vps2Session

createAnchor

Create and start tracking an anchor at the specified pose.

Declaration​

fun createAnchor(pose: Pose): UUID

Summary​

Create and start tracking an anchor at the specified pose.

Returns​

The anchor's unique id — an NSDK UUID (typealias UUID = ByteArray, a 32-byte ASCII uppercase-hex id, not java.util.UUID). Use anchorIdToString for a printable string.

Throws​

  • NsdkInvalidOperationStatusException — if the current localization tracking state is not Vps2TrackingState.PRECISE.