public override void Create() { NewtonBody child = GetComponent <NewtonBody>(); dMatrix matrix = Utils.ToMatrix(m_posit, Quaternion.Euler(m_rotation)); IntPtr otherBody = (m_otherBody != null) ? m_otherBody.GetBody().GetBody() : new IntPtr(0); m_joint = new dNewtonJointBallAndSocket(matrix, child.GetBody().GetBody(), otherBody); Stiffness = m_stiffness; }
public override void InitJoint() { NewtonBody child = GetComponent <NewtonBody>(); dMatrix matrix = Utils.ToMatrix(m_Pivot, m_Pin); IntPtr otherBody = (m_OtherBody != null) ? m_OtherBody.GetBody().GetBody() : IntPtr.Zero; m_Joint = new dNewtonJointBallAndSocket(matrix, child.GetBody().GetBody(), otherBody); Stiffness = m_Stiffness; }