Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

WindInput

struct in Unity.U2D.Physics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Input to PhysicsBody.ApplyWind describing the wind velocity, drag and lift coefficients and the shape filter used to compute aerodynamic forces per attached shape.

Properties

Property Description
drag Drag coefficient. Scales the wind contribution in the relative-velocity term that drives the per-shape aerodynamic force.
force The wind velocity vector. Scaled by PhysicsBody.WindInput.drag when computing the per-shape aerodynamic relative velocity.
lift Lift coefficient. Scales the perpendicular component of the per-edge aerodynamic force (capsules and polygons only; circles ignore lift).
mask Category mask used to filter which attached shapes contribute. A shape participates iff (shape.contactFilter.categories.bitMask & mask.bitMask) != 0. Defaults to PhysicsMask.All when the input is created via the parameterless constructor.
useTriggers When true, trigger shapes contribute to wind alongside solid shapes. When false, trigger shapes are skipped.

Constructors

Constructor Description
PhysicsBody.WindInput Create a default WindInput. The PhysicsBody.WindInput.mask defaults to PhysicsMask.All so every attached shape contributes unless explicitly filtered out.