获取鼠标点击的屏幕坐标

作者:追风剑情 发布于:2014-4-17 11:27 分类:Unity3d

void Update () {
        if (Input.GetMouseButtonDown(0))
        {
            Vector3 screenPos = Input.mousePosition;
            Debug.Log("screenPos.x=" + screenPos.x + ", screenPos.y=" + screenPos.y + ", screenPos.z=" + screenPos.z);
        }
}

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号