Пример #1
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray        ray = cam.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, layerMask))
            {
                Vector3 pos = cam.ScreenToWorldPoint(Input.mousePosition);

                HImage img = hit.transform.root.GetComponent <HImage>();
                HManager.instance.currentImg = img;

                if (img.placeMode)
                {
                    img.CreateAnchor(hit.point);
                }
            }
        }
    }