/// <summary>
    /// Called when user LEFT CLICKS
    /// Moves pixel block to specified location
    /// </summary>
    public void MovePixelBlock()
    {
        float pixBlockX = xrcursor.cursor.transform.position.x;
        float pixBlockZ = xrcursor.cursor.transform.position.z;

        Debug.Log("Moved Pixel Block to " + pixBlockX + "," + pixBlockZ);

        pixelBlockManager.MovePixelBlock(pixBlockX, pixBlockZ);
    }
Exemple #2
0
    /// <summary>
    /// Called when user presses right hand trigger on controller.
    /// Gets the unity (X,Z) position of the XR_Cursor
    /// Moves pixel block to specified location
    /// </summary>
    public void GetCursorLocation()
    {
        float pixBlockX = xrcursor.cursor.transform.position.x;
        float pixBlockZ = xrcursor.cursor.transform.position.z;



        // only set pixel on terrain if we hit a valid target
        if (xrcursor.validTarget)
        {
            pixelBlockManager.MovePixelBlock(pixBlockX, pixBlockZ);
        }
    }