예제 #1
0
            public Leg(IKSolverFullBodyBiped solver, PuppetMaster puppetMaster, FullBodyBipedEffector effectorType)
            {
                this.solver = solver;
                effector    = solver.GetEffector(effectorType);
                chain       = solver.GetChain(effectorType);

                stepFrom = effector.bone.position;
                stepTo   = effector.bone.position;
                position = effector.bone.position;

                offset = effectorType == FullBodyBipedEffector.LeftFoot? Vector3.left: Vector3.right;

                stepTimer  = 0f;
                stepLength = 0f;

                muscle      = puppetMaster.GetMuscle(effector.bone);
                thighMuscle = puppetMaster.GetMuscle(chain.nodes[0].transform);

                mass          = muscle.rigidbody.mass;
                inertiaTensor = muscle.rigidbody.inertiaTensor;
            }
예제 #2
0
 public void Apply(FullBodyBipedChain chain, IKSolverFullBodyBiped solver)
 {
     solver.GetChain(chain).reachSmoothing = this.reachSmoothing;
     solver.GetEndEffector(chain).maintainRelativePositionWeight = this.maintainRelativePositionWeight;
     solver.GetLimbMapping(chain).weight = this.mappingWeight;
 }