Skip to main content

shape_apply_wind

Function shape_apply_wind 

Source
pub fn shape_apply_wind(
    world: &mut World,
    shape_id: ShapeId,
    wind: Vec2,
    drag: f32,
    lift: f32,
    wake: bool,
)
Expand description

Apply wind to a shape, applying drag and lift forces to the owning body. (b2Shape_ApplyWind)

force = 0.5 * air_density * velocity^2 * area https://en.wikipedia.org/wiki/Density_of_air https://en.wikipedia.org/wiki/Lift_(force)