Rigidbody gravity when grounded

It seems that the force of gravity on a rigidbody is only applied when it hasn't already been grounded. So, for example, if I have a script that alters Physics.gravity y to toggle +/- 9.81 it will only affect my physics objects if they're still in the air. Am I correct in my observation? Is there any simple way to bypass this or do I need to just script gravity myself?

Your problem is likely to have to do with the way a physics engine works. To save processing power the engine will make objects that are no longer in motion go to sleep & stop updating themselves untill they're are hit or moved.

In your case it would appear so that the objects that stay on the ground are still sleeping and the gravity might not actually be applied to it.

A simple way to counter this would be to find every object that has a rigidbody and wake those rigidbodies up. The problem with this solution is that your next frame is going to be a bit heavy to swallow for the engine (if you're working with a lot of bodies).

You can execute the following code right after you've swapped the gravity to force every rigidbody in your scene to wake up.

I'm not 100% sure if this would solve your problem though.

Rigidbody[] rigidBodies = (Rigidbody[]) FindObjectsOfType(typeof (Rigidbody));

        foreach (Rigidbody body in rigidBodies)