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?
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?
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.