Exemple #1
0
        protected virtual void ClickAndMove()
        {
            RaycastHit hit;

            if (Input.GetMouseButton(0))
            {
                if (Physics.Raycast(tpCamera.GetComponent <Camera>().ScreenPointToRay(Input.mousePosition), out hit, Mathf.Infinity, clickMoveLayer))
                {
                    if (onEnableCursor != null)
                    {
                        onEnableCursor(hit.point);
                    }
                    cursorPoint = hit.point;
                }
            }
        }