Question About Rigidbody Drag

I’ve been learning about manual physics calculations, specifically acceleration. And now that I know a bit more about how drag is calculated, I don’t think I understand what the engine is doing with this variable.

To me it looks like the two things it could represent are air density and surface area. Maybe it represents both, maybe it represents only one or the other? The documentation I found only talked about changing it in code.

So, what exactly does the Rigidbody drag variable represent?

It’s simply a dimensionless value that is applied to diminish velocity.

Something similar to:
velocity = (velocity + acceleration * Time.deltaTime) * ( 1 - drag * Time.deltaTime);

You can decide to use it to represent aero/fluid drag, mechanical friction, magnetic reluctance, or whatever you want.

Okay, thank you.

So, say I throw a ball into a sand pit with a collider to tell the ball that it’s in a sand pit.
I would use whatever I think is an appropriate amount of air resistance until it hits the collider, where it would then trigger an event to turn the drag to sand pit drag?

That’s a very common solution to the air vs water drag problem, yes.

The drag setting is generally intended to be used for air friction and the physics materials are used for surface friction. But you’re obviously free to remove surface friction and use the drag for both. For example when moving a rigidbody over a surface it can sometimes bounce slightly which results in very inconsistent speed and so what I’ll sometimes do is disable surface friction and increase drag when on the ground and decrease it while flying through the air.