/// <summary> /// Unity Update method. /// </summary> public void Update() { // Get the current Pose. ApiPose apiPose = AnchorApi.GetAnchorPose( ARCoreExtensions.Instance.CurrentARCoreSessionHandle, m_AnchorHandle); m_Pose = Translators.ToUnityPose(apiPose); // Update the cloud reference point transform to match. transform.localPosition = m_Pose.position; transform.localRotation = m_Pose.rotation; }
/// <summary> /// Unity Update method. /// </summary> public void Update() { // Get the current Pose. ApiPose apiPose = AnchorApi.GetAnchorPose( ARCoreExtensions._instance.currentARCoreSessionHandle, _anchorHandle); _pose = Translators.ToUnityPose(apiPose); // Update the Cloud Anchor transform to match. transform.localPosition = _pose.position; transform.localRotation = _pose.rotation; }
/// <summary> /// Unity Update method. /// </summary> public void Update() { #if UNITY_EDITOR _pose = ARCoreCloudAnchorsEditorDelegate.Instance.GetAnchorPose(ARCoreExtensions._instance.currentARCoreSessionHandle, _anchorHandle); #endif if (!Application.isEditor) { // Get the current Pose. ApiPose apiPose = AnchorApi.GetAnchorPose( ARCoreExtensions._instance.currentARCoreSessionHandle, _anchorHandle); _pose = apiPose.ToUnityPose(); } // Update the Cloud Anchor transform to match. transform.localPosition = _pose.position; transform.localRotation = _pose.rotation; }