/// <summary> /// Draw a map quality indicator at the given position and enable it. /// </summary> /// <param name="detectedPlaneType">The type of the plane where the anchor is placed. /// </param> /// <param name="camera">The main camera.</param> public void DrawIndicator(DetectedPlaneType detectedPlaneType, Camera camera) { // To use customized value, remove this line and set the desired range in inspector. Range = detectedPlaneType == DetectedPlaneType.Vertical ? _verticalRange : _horizontalRange; _mainCamera = camera; // Get the direction from the center of the circle to the center of the arc // in world space. _centerDir = detectedPlaneType == DetectedPlaneType.Vertical ? transform.TransformVector(Vector3.up) : transform.TransformVector(-Vector3.forward); DrawBars(); DrawRing(); gameObject.SetActive(true); }
private bool IsPlaneTypeAllowed(DetectedPlaneType planeType) { if (ObjectTranslationMode == TranslationMode.Any) { return(true); } if (ObjectTranslationMode == TranslationMode.Horizontal && (planeType == DetectedPlaneType.HorizontalDownwardFacing || planeType == DetectedPlaneType.HorizontalUpwardFacing)) { return(true); } if (ObjectTranslationMode == TranslationMode.Vertical && planeType == DetectedPlaneType.Vertical) { return(true); } return(false); }