Example #1
0
    void Update()
    {
        if (inputX.GetInputs() && !DataScript.inputLock)
        {
            GeneralInput gInput = inputX.GetInput(0);

            if (gInput.phase == IPhase.Began)
            {
                Ray        ray = Camera.main.ScreenPointToRay(gInput.currentPosition);
                RaycastHit raycastHit;

                if (Physics.Raycast(ray, out raycastHit))
                {
                    if (raycastHit.transform.gameObject.tag == "Hex")
                    {
                        StartCoroutine(CarryRagdollToNewPos(raycastHit.transform.gameObject));
                    }
                }
            }
        }
    }