예제 #1
0
        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);
        }
예제 #2
0
        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);
        }