AreaEffector2D
Applies forces within an area.
Read time 6 minutesLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: Effector2D
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 |
|---|---|
| angularDamping | The angular damping to apply to rigid-bodies. |
| forceAngle | The angle of the force to be applied. |
| forceMagnitude | The magnitude of the force to be applied. |
| forceTarget | The target for where the effector applies any force. |
| forceVariation | The variation of the magnitude of the force to be applied. |
| linearDamping | The linear damping to apply to rigid-bodies. |
| useGlobalAngle | Should the |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |