More ways to break the cloth
This update was mostly about adding interactive features.
The biggest one was cloth tearing. My first attempt never actually worked because the strain limiter prevented springs from stretching far enough to snap. The fix was checking the stretch before the limiter ran, then making sure tearing also removed the connected shear and bend springs so pieces actually separated instead of hanging by invisible links.
I also added:
- A throwable physics ball that transfers momentum into the cloth.
- Mouse grabbing so you can pull and fling the fabric around.
- A live tension heatmap to show where the cloth is under stress.
- Slow motion (down to 1/8×) and frame-by-frame stepping for debugging.
The ball ended up being my favourite feature. Throwing it through a pinned curtain now rips a hole through the fabric, the stress heatmap lights up around the impact, and the cloth keeps simulating normally afterwards.
Everything was backed up with new self-tests for tearing and ball collisions, and the original cloth behaviour stayed identical when the new features were disabled.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.