Skip to content

Instantly share code, notes, and snippets.

@Tzeentchful
Created November 3, 2015 09:52
Show Gist options
  • Save Tzeentchful/62f2e1c5a243c502cdc3 to your computer and use it in GitHub Desktop.
Save Tzeentchful/62f2e1c5a243c502cdc3 to your computer and use it in GitHub Desktop.
void ClothPoint::TimeStep(float _dt)
{
if (m_Moveable)
{
D3DXVECTOR3 temp = m_Pos;
m_Pos += DAMPING * (m_Pos - m_PrevPos) + (m_Acceleration * _dt);
m_PrevPos = temp;
m_Acceleration = D3DXVECTOR3(0, 0, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment