Scratch Catfoodus Meow finally gained realistic friction abilities, and decided to go to the variable-friction tilting slope in a vacuum with 2d confinement to test things out. Use mouse to move scratch cat with an invisible spring. This simulation uses Coulomb’s law of friction (actually, it takes the maximum value with some adjustments… but seriously real friction is actually very complicated I’m not even kidding. also, μ_k=μ_s/2 here)
How this friction works: First, it normalizes the velocity (which is fancy for saying “set length to 1 but keep direction”), and then multiplies the normal force (force down onto the plane) by the coefficient of friction (the higher, the more friction) to get the friction’ magnitude. Then, the normalized velocity is multiplied by the friction’s magnitude and negated to produce realistic friction. As you can see, it takes a bit of effort to get scratch cat going, but once he’s going, he’s going. NOTE: If you use this method to simulate friction in your games, 1. you don’t have to credit me (this is coulomb’s idea, not mine) unless you use this exact project, and 2. don’t set the coefficient of friction too high, or things will be very hard to move (that’s why the friction is 50 default) See https://en.wikipedia.org/wiki/Friction#Laws_of_dry_friction