How to set Gravity to affect certain objects and not others

I have a little script that changes the gravity when my character is underwater to give it that floaty feel. Is there a way to have the gravity only affect the character and not everything in the whole scene.
At the moment when I jump in the water all the dynamic objects gently floooaaat away…

maybe with Actuator- Edit Object - Dynamics - Suspend Dynamics ?!

Instead of changing gravity on the whole world when your character enters the water, just use forces.

Simple answer: Apply a constant upwards force with the motion actuator when your character is underwater.

Complete answer:

Quick physics lesson!

Consider that gravity is a constant acceleration… and it does not depend on mass. If you have gravity set to 10, your object will have a constant downwards acceleration of 10 blender units (BU) / second.

Accelerations are brought about by forces. The general formula is Force = Mass * Acceleration, or F=MA. Therefore, with a gravity of 10 and a mass of… say, 2, the force of gravity on that object is 2*10 = 20. So what this means is that gravity is exerting a constant force of 20 downwards on the object.

If you wanted to completely get rid of gravity, you could simply apply a constant upwards force of 20 to that object. If you wanted to half the effects of gravity, just apply a constant upwards force of 10 to that object when it’s underwater.

All other objects won’t be affected, as they don’t have any other forces acting on them.

I hope that’s clear enough!


Thanks, theSambassador! That solved the problem without needing any mind bending scripting.