Пример #1
0
    public override void InitJoint()
    {
        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 dNewtonJointSlider(matrix, child.GetBody().GetBody(), otherBody);

        Stiffness       = m_stiffness;
        EnableLimits    = m_enableLimits;
        SetSpringDamper = m_setSpringDamper;
    }
        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 dNewtonJointSlider(matrix, child.GetBody().GetBody(), otherBody);

            Stiffness       = m_Stiffness;
            EnableCollision = m_EnableCollision;
            EnableLimits    = m_EnableLimits;
            SetSpringDamper = m_SetSpringDamper;
        }