Ejemplo n.º 1
0
        public void Initiate(BehaviourBase behaviour, SubBehaviourCOM centerOfMass)
        {
            this.behaviour    = behaviour;
            this.centerOfMass = centerOfMass;

            behaviour.OnPostRead += OnPostRead;
        }
        public void Initiate(BehaviourBase behaviour, SubBehaviourCOM centerOfMass, IKSolverFullBodyBiped solver)
        {
            this.behaviour    = behaviour;
            this.centerOfMass = centerOfMass;
            this.solver       = solver;

            behaviour.OnPostRead += OnPostRead;
        }
Ejemplo n.º 3
0
        public void Initiate(BehaviourBase behaviour, SubBehaviourCOM centerOfMass, LayerMask groundLayers, IKSolverFullBodyBiped solver)
        {
            this.behaviour    = behaviour;
            this.centerOfMass = centerOfMass;
            this.groundLayers = groundLayers;
            this.solver       = solver;

            behaviour.OnPreActivate    += OnPreActivate;
            behaviour.OnPostRead       += OnPostRead;
            behaviour.OnPreDisable     += OnPreDisable;
            behaviour.OnPostDrawGizmos += OnPostDrawGizmos;

            legs = new Leg[2] {
                new Leg(solver, behaviour.puppetMaster, FullBodyBipedEffector.LeftFoot),
                new Leg(solver, behaviour.puppetMaster, FullBodyBipedEffector.RightFoot)
            };
        }
        public void Initiate(BehaviourBase behaviour, SubBehaviourCOM centerOfMass, IKSolverFullBodyBiped solver)
        {
            this.behaviour    = behaviour;
            this.centerOfMass = centerOfMass;
            this.solver       = solver;

            behaviour.OnPreActivate += OnPreActivate;
            behaviour.OnPostRead    += OnPostRead;
            behaviour.OnPreDisable  += OnPreDisable;

            leftFootRigidbody  = behaviour.puppetMaster.GetMuscle(solver.leftFootEffector.bone).rigidbody;
            rightFootRigidbody = behaviour.puppetMaster.GetMuscle(solver.rightFootEffector.bone).rigidbody;

            leftFootMass  = leftFootRigidbody.mass;
            rightFootMass = rightFootRigidbody.mass;

            leftFootInertiaTensor  = leftFootRigidbody.inertiaTensor;
            rightFootInertiaTensor = rightFootRigidbody.inertiaTensor;
        }