Friction and Restitution
A crate thumps onto a boat's wet deck, hops once, and skids to a halt. Change two numbers and the same crate bounces off like a rubber ball, or slides clean across the deck and into the sea. Those two numbers are friction and restitution, and you'll find both in every engine's physics materials.
The rule
Friction resists sliding with μ times the press; restitution keeps e of the speed.
Friction. When two surfaces press together, the surface pushes back with a normal force ; on a flat deck it equals the weight, . Sliding friction has size , where (the Greek letter mu) is the friction coefficient, and it always points against the direction of sliding. Static friction holds a resting object in place, up to a limit that is usually a little higher than the sliding value. Push harder than that limit and the crate breaks loose.
Restitution. When a body hits a surface, the coefficient of restitution , a number from 0 to 1, says how much of its speed toward the surface survives the bounce: rebound speed = × impact speed. is a dead thud; is a perfect bounce that loses nothing. Bounce height grows with the square of speed, so each bounce reaches of the height before.
Each object gets a physics material that holds these numbers, and when two objects touch, the engine combines their two materials (averaging them, taking the smaller, and so on, depending on its settings).
The shortcut
Friction: μ × weight, pointing backward. Bounce: speed × e, height × e².
Normal force
On a flat deck, N = 20 × 9.8 = 196 N.
The trap: friction can only stop a slide, never reverse it. If, in some step, friction's change to the velocity would carry the speed past zero, the code must set the velocity to zero instead. Otherwise the crate jitters back and forth on the deck forever.
Drills
Answer fast — trust the rule.
A crate hits the deck at 8 m/s with restitution 0.25. How fast does it bounce back up?
A crate dropped from 4 m has e = 0.5. How high does it rise after the first bounce?
Which restitution would make a rubber buoy bounce forever without losing height?
A crate rests on a gently tilted deck and doesn't slide. What holds it in place?
Remember
- Sliding friction = μ × normal force, against the motion; static friction holds things still up to a limit.
- Bounces: rebound speed = e × impact speed, and height × e².
- Friction stops a slide but never reverses it: clamp the velocity at zero.
