Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.VPS2 ←ARVps2AnchorManager

TryCreateAnchor

Attempts to create a new anchor at localPose.

Declaration​

public bool TryCreateAnchor(Pose localPose, out ARVps2Anchor anchorOut)

Summary​

Attempts to create a new anchor at localPose.

Remarks​

The pose is in AR session space, not Unity world space: it is forwarded to the
subsystem unmodified, unlike ARAnchorManager, which takes a world-space
pose. The pose of TryGetAssetTrackingData is already
in AR session space and can be passed as is. To anchor at a world-space pose,
such as the transform of an ARVps2Asset or any other trackable,
convert it first with origin.TrackablesParent.InverseTransformPose.



An anchor created here will only track with the asset of the site that was active
at the time of the anchor's creation.

Returns​

true if the anchor was created; otherwise false.

Parameters​

NameTypeSummary
localPosePose
The pose, in AR session space, of the anchor.
anchorOutout ARVps2Anchor
The created anchor.