I have prefabs that have collider, rigidbody and their size and mass are set to correspond to realworld meters/kilograms.
Now I want to instantiate these prefabs at different uniform scales (scales ranging from 0.2 - 2.0).
My question is, how does scaling (changing transform.localScale) affect physics? does the physic engine already consider the uniform scale for it’s calculation, or do I for example have to multiply the rigidBody mass by scale^3? what about drag?
You would indeed need to alter the mass and drag manually. Luckily, rigidbodies don’t care about size; the aggregate of a GameObject’s colliders give it it’s dimensions. So just scale your gameObject and set the mass and drag by a factor of whatever you scaled it by!
// Instantiate the RigidBody
Rigidbody newBody = Instantiate(object, transform.position, Quaternion.identity) as Rigidbody;
// Scale the game object associated with the RigidBody by 15 (i.e. 15 times larger than normal).
newBody.gameObject.transform.localScale *= 15.0f;