Esempio n. 1
0
			// The custom constructor
			public Foot (IKSolver solver, Transform transform) {
				this.solver = solver;
				this.transform = transform;
				this.leg = null;
				rotation = transform.rotation;
			}
Esempio n. 2
0
        // Set the effector positionOffset for the foot
        private void SetLegIK(IKEffector effector, Grounding.Leg leg)
        {
            effector.positionOffset += (leg.IKPosition - (effector.bone.position + effector.positionOffset)) * weight;

            effector.bone.rotation = Quaternion.Slerp(Quaternion.identity, leg.rotationOffset, weight) * effector.bone.rotation;
        }