Buoyancy

I am making a game with swimming and stuff like that. The thing I can’t figure out to make is how you sink/float using keys like for example C to sink, and SpaceBar to float in the water. Any advice?

What have you done so far? Is your physics volume done? Does your character swimm? If so, then you can start playing with the settings.

For example, considering a fluid friction of 1.0, to surface, you can set the buoyancy > 1 and to dive, buoyancy < 1: