Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AreaEffector2D

Applies forces within an area.
Read time 6 minutesLast updated 5 days ago

Definition

public class AreaEffector2D : Effector2D

Remarks

When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. When the source Collider isn't a trigger, the effector will apply forces whenever the target Collider2D is in contact with the source only.
This effector is designed primarily to work with source Collider2D that are set as triggers so that target Collider2D can overlap the defined area.

Properties

Property

Description

angularDampingThe angular damping to apply to rigid-bodies.
forceAngleThe angle of the force to be applied.
forceMagnitudeThe magnitude of the force to be applied.
forceTargetThe target for where the effector applies any force.
forceVariationThe variation of the magnitude of the force to be applied.
linearDampingThe linear damping to apply to rigid-bodies.
useGlobalAngleShould the
forceAngle
use global space?

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.