← Back to context

Comment by diss

2 days ago

It’s actually a lot simpler than you might think. I say that having written the “tearable cloth” demo linked elsewhere in this thread before I’d even started my SWE career.

In this case it’s basic “verlet” integration, which involves updating 2d vectors forming the grid based on their current and previous position, and constraining them to a certain distance from their immediate neighbours. Draw lines between them and you have a cloth. I first came across it because I was fascinated by physics simulation and it was one of the simplest things to implement. A lot of bang for your buck in terms of results. It gets far more complicated from there.