Skip to main content

apply_buoyancy

Function apply_buoyancy 

Source
pub fn apply_buoyancy(world: &mut World, time: f32, dt: f32)
Expand description

Floats rigid bodies in water: each dynamic body gets an upward force proportional to how much of it is under the moving surface, plus water drag. Call once per fixed physics step.