How do I do that? I’ll have some water in second level of my game and I don’t want player just drown.
Buoyancy depends on the relative density of an object to the fluid in which it is floating, together with the degree by which it is covered by the fluid. You’ll also probably want to consider drag, which depends on the viscosity of the fluid. If you’re using inbuilt Physics, it should be relatively easy to implement these additional forces when the player object is in contact with water, and let the physics engine resolve them automatically.