Exemplo n.º 1
0
 /// <summary>This function is called when the user presses "Place game" on the UI which will place the game on the surface provided by Vuforia.</summary>
 /// <returns>Void.</returns>
 public void PlaceGame()
 {
     // call Vuforia function
     planeFinderBehaviour.PerformHitTest(new Vector2(0, 0));
     // update UI
     OnGamePlaced.Invoke();
 }
Exemplo n.º 2
0
 public void TryPlaceContent(Vector2 screenPosition)
 {
     if (!isContentPlaced)
     {
         planeFinderBehaviour.PerformHitTest(screenPosition);
     }
 }
Exemplo n.º 3
0
 public void FindPlane(Vector2 pos)
 {
     if (isGameStarted)
     {
         return;
     }
     planeFinder.PerformHitTest(pos);
 }
    public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
    {
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED ||
            newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            if (!primo)
            {
                //if (!m_ResetButton) m_ResetButton.interactable = true;
                Vector2 screenPoint;

                screenPoint = mainCamera.WorldToScreenPoint(cube.transform.position);
                Debug.Log(screenPoint);

                m_PlaneFinder.PerformHitTest(screenPoint);

                cube.SetActive(false);
                Debug.Log("Trackable found first time");
                primo = true;
            }
        }
    }
Exemplo n.º 5
0
    void TaskOnClick()
    {
        Vector2 aPosition = new Vector2(0, 0);

        plane.PerformHitTest(aPosition);
    }
Exemplo n.º 6
0
    void replace()
    {
        Vector2 aPosition = new Vector2(0, 0);

        p.PerformHitTest(aPosition);
    }
Exemplo n.º 7
0
    public void replaceBoard(Vector3 nullpoint)
    {
        Vector2 aPosition = c.WorldToScreenPoint(nullpoint);

        p.PerformHitTest(aPosition);
    }