Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ApplyWind(Vector2, float, float, bool)

Apply a wind force to the shape body using the density of air This considers the projected area of the shape in the wind direction. This also considers the relative velocity of the shape. This only has an effect if the shape body is RigidbodyType2D.Dynamic. This only has an effect of shapes of type Circle, Capsule or Polygon.
Read time 1 minuteLast updated 10 days ago

Definition

public void ApplyWind(Vector2 force, float drag, float lift, bool wake = true)

Parameters

force

The wind velocity in world-space.

drag

The drag coefficient which is a force that opposes the relative velocity.

lift

The lift coefficient which is a force that is perpendicular to the relative velocity.

wake

Whether the shape body should be woken or not.