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 dNewtonJointDoubleHinge(matrix, child.GetBody().GetBody(), otherBody); Stiffness = m_stiffness; EnableLimits_0 = m_enableLimits_0; }
public override void InitJoint() { NewtonBody child = GetComponent <NewtonBody>(); dMatrix matrix = Utils.ToMatrix(m_Pivot, m_Pin0, m_Pin1); IntPtr otherBody = (m_OtherBody != null) ? m_OtherBody.GetBody().GetBody() : IntPtr.Zero; m_Joint = new dNewtonJointDoubleHinge(matrix, child.GetBody().GetBody(), otherBody); Stiffness = m_Stiffness; EnableCollision = m_EnableCollision; EnableLimits_0 = m_EnableLimits_0; EnableLimits_1 = m_EnableLimits_1; }