Beispiel #1
0
    void Break()
    {
        RaycastHit hit;

        if (Physics.Raycast(cam.transform.position, Quaternion.Euler(new Vector3(-rx, ry, 0)) * new Vector3(0, 0, 1), out hit))
        {
            VoxelChunk c = hit.transform.gameObject.GetComponent <VoxelChunk>();
            if (c != null)
            {
                c.Break(hit.point, Size);
            }
        }
    }