Example #1
0
 private void OnPlaneAdded(ARPlaneAddedEventArgs args)
 {
     if (!activePlanes.Contains(args.plane))
     {
         activePlanes.Add(args.plane);
     }
 }
Example #2
0
 // adds planes if they are horizontal
 void OnPlaneAdded(ARPlaneAddedEventArgs args)
 {
     if (args.plane.boundedPlane.Alignment == PlaneAlignment.Horizontal && !isPlaced)
     {
         ShowMessage.text = "Placing! " + args.plane.boundedPlane.Pose.position.ToString();
         StartCoroutine(AutoHitTest());
         isPlaced = true;
     }
 }
    void OnPlaneAdded(ARPlaneAddedEventArgs eventArgs)
    {
        var plane = eventArgs.plane;

        // Check whether the plane is a vertical plane.
        if (plane.boundedPlane.Alignment == PlaneAlignment.Vertical)
        {
            // Disable the entire GameObject.
            plane.gameObject.SetActive(false);

            // Add to our log so the user knows something happened.
            m_LogText.text += string.Format("\n{0}", plane.boundedPlane.Id);
        }
    }
    void OnPlaneAdded(ARPlaneAddedEventArgs eventArgs)
    {
        var plane = eventArgs.plane;

        // 水平地面であるか確認する
        if (plane.boundedPlane.Alignment == PlaneAlignment.Horizontal)
        {
            var state = plane.trackingState;
            Logging.Debug("Plane detection is: " + state.ToString());

            var name = plane.boundedPlane.Id;
            //// Add to our log so the user knows something happened.
            //if (logText != null)
            //    logText.text = string.Format("\n{0}", plane.boundedPlane.Id);
        }
    }
 private void OnPlaneDetected(ARPlaneAddedEventArgs args)
 {
     Instantiate(m_PlacedPrefab[Random.Range(0, m_PlacedPrefab.Length - 1)], args.plane.boundedPlane.Center, Quaternion.identity);
     planeCounter++;
 }
 void OnPlaneAdded(ARPlaneAddedEventArgs eventArgs)
 {
     informationText.text = planeFoundMsg;
     startButton.gameObject.SetActive(true);
     surfaceFound = true;
 }
 private void OnPlaneAdded(ARPlaneAddedEventArgs args)
 {
     m_planeSatisfaction.Value = Mathf.Max(0, m_planeSatisfaction.Value - 1);
 }
Example #8
0
 //To get the number of plane when plane added
 void PlaneAddedFunction(ARPlaneAddedEventArgs planeUpdated_Args)
 {
     nPlane = m_PlaneManager.planeCount;
     displayCountText();
 }