verlet integration - pilkch/library GitHub Wiki
Reference
- https://subprotocol.com/system/verlet-hello-world.html
- https://subprotocol.com/system/cloth.html
- https://subprotocol.com//system/tree.html
- https://github.com/subprotocol/verlet-js/blob/master/lib/constraint.js
- https://www.reddit.com/r/Unity3D/comments/pks6ys/i_learned_about_verlet_integration_thanks_to/
Ideas
- Purely visual, can be attached to a body such as hair/belt/chain on a character, or flag on a car, but does not affect the physics of the character/car
- Flags
- Sails
- Washing on a line
- Bobble head like in Dirt 2
- Attach things to vehicles: flags, ropes, chains, jerry cans, spare tyres, bags. Make the passengers verlet so that they fly around a bit when you corner or crash?
- Ferns and grass that sway in the wind and move out of the way of the player (Add a sphere or capsule for the player that the verlet points try to move out of)
- Shoot holes in flags? Destroy links or delete particles?
- Ragdolls
Constraints
- Pin (Constrains a point to specific position in the world)
- Distance (Constrains two points to be a certain distance from each other, optionally with some "springiness")
- Angle (Constrains 3 points connected in a V shape where the angle they make has to be within a certain range https://github.com/subprotocol/verlet-js/blob/master/lib/constraint.js#L84)
Optionally when a distance constraint exceeds a certain distance it can generate a "break" event that will destroy it after this iteration