Example #1
0
    /// <summary>
    /// Initialise the spring
    /// </summary>
    public void Init(VectorGridPoint point1, VectorGridPoint point2, GridSpringType springType, float stiffness, float damping, float restDistanceScalar)
    {
        m_Point1     = point1;
        m_Point2     = point2;
        m_SpringType = springType;

        m_Stiffness    = stiffness;
        m_Damping      = damping;
        m_RestDistance = Vector3.Distance(m_Point1.m_OriginalPosition, m_Point2.m_OriginalPosition) * restDistanceScalar;
    }
Example #2
0
	/// <summary>
	/// Initialise the spring
	/// </summary>
	public void Init(VectorGridPoint point1, VectorGridPoint point2, GridSpringType springType, float stiffness, float damping, float restDistanceScalar)
	{
		m_Point1 = point1;
		m_Point2 = point2;
		m_SpringType = springType;
		
		m_Stiffness = stiffness;
		m_Damping = damping;
		m_RestDistance = Vector3.Distance(m_Point1.m_OriginalPosition, m_Point2.m_OriginalPosition) * restDistanceScalar;
	}