// Initiating the pelvis public void Initiate(Grounding grounding) { this.grounding = grounding; initiated = true; OnEnable(); }
// Gets the direction from the root to the foot (ortho-normalized to root.up) private Vector3 GetLegSpineTangent(Grounding.Leg leg) { Vector3 tangent = leg.transform.position - solver.root.position; if (!solver.rotateSolver || solver.root.up == Vector3.up) return new Vector3(tangent.x, 0f, tangent.z); Vector3 normal = solver.root.up; Vector3.OrthoNormalize(ref normal, ref tangent); return tangent; }
// Initiates the Leg public void Initiate(Grounding grounding, Transform transform) { initiated = false; this.grounding = grounding; this.transform = transform; up = Vector3.up; initiated = true; OnEnable(); }
// Initiates the Leg public void Initiate(Grounding grounding, Transform transform) { initiated = false; this.grounding = grounding; this.transform = transform; initiated = true; OnEnable(); }
public void Initiate(Grounding grounding, Transform transform) { this.initiated = false; this.grounding = grounding; this.transform = transform; this.up = Vector3.up; this.initiated = true; this.OnEnable(); }
public void Initiate(Grounding grounding, Transform transform) { this.initiated = false; this.grounding = grounding; this.transform = transform; this.up = Vector3.up; this.IKPosition = transform.position; this.rotationOffset = Quaternion.identity; this.initiated = true; this.OnEnable(); }
// Initiates the Leg public void Initiate(Grounding grounding, Transform transform) { initiated = false; this.grounding = grounding; this.transform = transform; up = Vector3.up; IKPosition = transform.position; initiated = true; OnEnable(); }
// Gets the bend direction for a foot private Vector3 GetLegSpineBendVector(Grounding.Leg leg) { Vector3 spineTangent = GetLegSpineTangent(leg); float dotF = (Vector3.Dot(solver.root.forward, spineTangent.normalized) + 1) * 0.5f; float w = (leg.IKPosition - leg.transform.position).magnitude; return spineTangent * w * dotF; }
// Set the effector positionOffset for the foot private void SetLegIK(IKEffector effector, Grounding.Leg leg) { effector.positionOffset += (leg.IKPosition - effector.bone.position) * weight; effector.bone.rotation = Quaternion.Slerp(Quaternion.identity, leg.rotationOffset, weight) * effector.bone.rotation; }
// Initiating the pelvis public void Initiate(Grounding grounding) { this.grounding = grounding; initiated = true; OnEnable(); }
public static void Visualize(Grounding grounding, Transform root, Transform foot) { Handles.SphereCap(0, foot.position + root.forward * grounding.footCenterOffset, root.rotation, grounding.footRadius * 2f); }
} // 0x00000001802466A0-0x00000001802466B0 // Methods public void Initiate(Grounding grounding) { } // 0x00000001809C3120-0x00000001809C31A0
} // 0x00000001809C2990-0x00000001809C2A40 // Methods public void Initiate(Grounding grounding, Transform transform) { } // 0x00000001809C1010-0x00000001809C1150