private HkConstraintData CreateBallAndSocketConstraintData(ref Matrix otherLocalMatrix, ref Matrix headPivotLocalMatrix) { HkBallAndSocketConstraintData data = new HkBallAndSocketConstraintData(); Vector3 otherPivot = otherLocalMatrix.Translation; Vector3 headPivot = headPivotLocalMatrix.Translation; data.SetInBodySpace(otherPivot, headPivot, m_otherPhysicsBody, OwnerVirtualPhysics); HkMalleableConstraintData mcData = new HkMalleableConstraintData(); mcData.SetData(data); mcData.Strength = 0.00006f; data.Dispose(); return(mcData); }
private static HkConstraintData CreateBallAndSocketConstraintData(ref Matrix otherLocalMatrix, ref Matrix headPivotLocalMatrix) { HkBallAndSocketConstraintData data = new HkBallAndSocketConstraintData(); Vector3 otherPivot = otherLocalMatrix.Translation; Vector3 headPivot = headPivotLocalMatrix.Translation; data.SetInBodySpace(ref otherPivot, ref headPivot); HkMalleableConstraintData mcData = new HkMalleableConstraintData(); mcData.SetData(data); mcData.Strength = 0.0003f; data.Dispose(); return(mcData); }