Beispiel #1
0
        public void Update()
        {
            Vector3 leftKneeToFoot = LeftFoot.position - LeftKnee.position;
            Vector3 leftKneeToHip  = LeftHip.position - LeftKnee.position;

            Vector3 rightKneeToFoot = RightFoot.position - RightKnee.position;
            Vector3 rightKneeToHip  = RightHip.position - RightKnee.position;

            walkingAlgorithm.thresholdAngleInDegreeInStep              = thresholdAngleInDegreeInStep;
            walkingAlgorithm.thresholdAngleInDegreeOutStep             = thresholdAngleInDegreeOutStep;
            walkingAlgorithm.thresholdKneeHipLengthInPercentageInStep  = thresholdKneeHipLengthInPercentageInStep;
            walkingAlgorithm.thresholdKneeHipLengthInPercentageOutStep = thresholdKneeHipLengthInPercentageOutStep;

            walkingAlgorithm.UpdateLocomotion(
                new Vector3[] {
                SpineBase.position,
                LeftKnee.position,
                leftKneeToFoot,
                leftKneeToHip,
                RightKnee.position,
                rightKneeToFoot,
                rightKneeToHip,
                SpineBase.right,
                SpineBase.forward
            });
            WalkInPlace();
        }