Skip to main content
API Reference com.nianticspatial.nsdk.vps VPSSession

createAnchor

Requests to create an anchor at the specified pose. This will create an anchor relative to the currently tracked location that can be used to localize in future sessions. Attention: This method requires that the session has successfully localized (an anchor was successfully tracked) before it returns a valid anchor payload for future sessions. After creating an anchor, regularly poll [getAnchorUpdate] to get the anchor's updated pose.

Declaration

fun createAnchor(pose: Pose): UUID

Summary

Requests to create an anchor at the specified pose. This will create an anchor relative to the currently tracked location that can be used to localize in future sessions. Attention: This method requires that the session has successfully localized (an anchor was successfully tracked) before it returns a valid anchor payload for future sessions. After creating an anchor, regularly poll [getAnchorUpdate] to get the anchor's updated pose.

Returns

A unique identifier for the created anchor


ON THIS PAGE