Example #1
0
    public void ReadyThrow()
    {
        // Ready for throw animation

        Assert.IsTrue(ikCatchController.HasCaughtBall());

        ikController.setIKActive(false, enabledIKGoals);
        ikCatchController.setActive(false);
        ikDeflectController.setActive(false);

        // Parent ball to hand
        Transform rHand = animator.GetBoneTransform(HumanBodyBones.RightHand);

        ikCatchController.caughtBall.SetParent(rHand);

        ikController.setLookAt(target);
        throwState = ThrowState.Throwing;
    }
Example #2
0
    void Start()
    {
        ikCatchController = GetComponent <IKCatchController>();
        ikCatchController.setActive(true);

        ikDeflectController = GetComponent <IKDeflectController>();
        ikDeflectController.setActive(true);

        animator = GetComponent <Animator>();
    }
    void Start()
    {
        ikCatchController = GetComponent <IKCatchController>();
        ikCatchController.setActive(true);

        ikDeflectController = GetComponent <IKDeflectController>();
        ikDeflectController.setActive(true);

        // Supply the bot with a new ball
        Vector3 ballPos = transform.position + transform.forward * 0.5f;

        ballPos.y += 1.5f;
        Instantiate(ballPrefab, ballPos, Quaternion.identity);
    }
Example #4
0
    void Start()
    {
        ikController = GetComponent <IKController>();
        ikController.setIKActive(true, enabledIKGoals);

        ikCatchController = GetComponent <IKCatchController>();
        ikCatchController.setActive(true);

        ikDeflectController = GetComponent <IKDeflectController>();
        ikDeflectController.setActive(true);

        ikThrowController = GetComponent <IKThrowController>();

        playerCameraController = GetComponent <PlayerCameraController>();

        animator = GetComponent <Animator>();
    }