using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Rigging.Action { //动作-控制双脚的位置,让双脚和双脚的中点尽可能和重心在水平的投影重合 public class Balance : RiggingActionBase { public Rigidbody handLeft; public Rigidbody handRight; public Rigidbody footLeft; // kneeLeft public Rigidbody footRight; // kneeRight public Rigidbody hip; private Vector3 centerOfMass; // 5.0759, 0, -7.2038 private Rigidbody[] allRigs//所有14个parts { get { return player.status.body.allRigs; } } public float balanceForce; public float footCenterForces; private float muscleMultiplier; //1 private float crouchMultiplier = 1f; //1 protected override void OnStart() { handLeft = player.body.handLeft.GetComponent(); handRight = player.body.handRight.GetComponent(); footLeft = player.body.kneeLeft.GetComponent(); footRight = player.body.kneeRight.GetComponent(); hip = player.body.hip.GetComponent(); } protected override void OnFixedUpdate() { } } }