Dynamic friction 2D rigid body
Members - Reputation: 111
Posted 06 October 2012 - 08:51 PM
Here's a temporary clip of what the simulation looks like currently:
Members - Reputation: 637
Posted 07 October 2012 - 01:58 AM
Members - Reputation: 550
Posted 07 October 2012 - 11:50 AM
So, next step is to find the velocity component in the tangential direction that you want to remove to create friction.
* Form the tangent vector using the perp operator on the contact normal
* Get the relative tangential velocity by dotting total relative contact point velocity against the tangent vector
* Now, you can then generate an impulse to remove some or all of this tangential velocity (most text books say the magnitude of this impulse should be bounded by the magnitude of the normal impulse, but if you just want infinite friction, remove the whole lot)
Edited by wildbunny, 07 October 2012 - 11:51 AM.