Friction vs FrictionStatic vs FrictionAir in Matter.js

Matter.js provides three distinct properties to control resistance and deceleration for rigid bodies: friction, frictionStatic, and frictionAir. While all three parameters restrict an object's motion, they govern completely different physical interactions—specifically kinetic surface friction, static contact adhesion, and atmospheric drag. Understanding how each property operates allows developers to create precise, realistic physics behaviors ranging from frictionless ice slides to heavy, high-drag movement.

Friction (Kinetic Friction)

The friction property represents kinetic or dynamic friction. It defines the resistance between two rigid bodies that are already in motion while sliding against one another.

FrictionStatic (Static Friction)

The frictionStatic property defines the resistance an object must overcome to start moving from a complete standstill while in contact with another surface.

FrictionAir (Air Resistance)

The frictionAir property models linear drag or atmospheric resistance acting on a body as it travels through space, independent of any surface contact.

Key Differences Summary