Friction Demo

When using global solvers and when working at the level of forces, implementing friction poses a signficant challenge. However, in a local, impulse-based solver such as this one, friction can be implemented rather naively with accurate and pleasing results.

Using the Sequential Impulses Method, implementing friction is as simple as looping over all collision constraints and applying additional impulses against the direction of tangent motion, proportional to the coefficient of friction. These impulses must be clamped, such that they at most cancel the tangent motion, rather than possibly reversing it.

In this demo, a series of obstacles collide without friction. Then, friction is enabled, and the simulation is repeated.

Copyright © Tim Straubinger.
Content on this site is published under the CC-by-NC-SA 4.0 License.

Get in touch with me via email.

This site is self-hosted and was built with baumkuchen.