private void SetNewGroundAnchor(ARPlaneAnchor anchorData) { if (lockOnFirst) { UnityARSessionNativeInterface.ARAnchorUpdatedEvent -= SetNewGroundAnchor; } AnchorUtility.UpdateGameObjectWithAnchorTransform(Ground.gameObject, anchorData); if (OnTracking != null) { OnTracking(); } }
public void OnDrag(PointData point) { Debug.Add(this, Rect.Location.ToString()); Offset = AnchorUtility.GetPivot(ScreenAnchor.Middle_Middle) * Rect.Size.ToVector2(); Position = point.Position.ToVector2() - Offset - (originAnchor - Offset); }