//Transitions
    public override IEnumerator EnterState(BaseState prevState)
    {
        if (currentNodes[0].transform.root.tag == "Enemy/Cyclops")
        {
            currentNodes[0].transform.root.GetComponent <CyclopsData>().beingClimbed = true;
        }

        rb.velocity   = Vector3.zero;
        rb.useGravity = false;
        IK.HeadWeight = 0;

        elapsedTime = 0;
        while (elapsedTime < 0.5f)
        {
            if (!moving)
            {
                IK.SetIKPositions(currentNodes[0].rightHand, currentNodes[1].leftHand, currentNodes[0].rightFoot, currentNodes[1].leftFoot);
            }
            rb.transform.position = Vector3.Lerp(rb.transform.position, (currentNodes[1].PlayerPosition + currentNodes[0].PlayerPosition) / 2, elapsedTime * 2);

            Quaternion desiredRotation = currentNodes[0].transform.rotation;
            if (freehang)
            {
                desiredRotation = Quaternion.Euler(0, desiredRotation.eulerAngles.y, desiredRotation.eulerAngles.z);
            }
            rb.transform.rotation = Quaternion.Lerp(rb.transform.rotation, desiredRotation, elapsedTime * 2);

            IK.GlobalWeight     = Mathf.Lerp(IK.RightHand.weight, 1, elapsedTime * 2);
            IK.RightFoot.weight = Mathf.Lerp(IK.RightFoot.weight, freehang ? 0 : 1, elapsedTime * 2);
            IK.LeftFoot.weight  = IK.RightFoot.weight;
            elapsedTime        += Time.deltaTime;
            yield return(null);
        }
        yield return(base.EnterState(prevState));
    }
 protected override void UpdateIK()
 {
     if (!moving)
     {
         IK.SetIKPositions
         (
             currentNodes[0].rightHand,
             currentNodes[1].leftHand,
             currentNodes[0].rightFoot,
             currentNodes[1].leftFoot
         );
     }
 }