PlatformEffector2D
Applies "platform" behaviour such as one-way collisions etc.
Read time 6 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: Effector2D
public class PlatformEffector2D : Effector2D
Remarks
When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. When the source Collider2D isn't a trigger, the effector will apply forces whenever the target Collider2D is in contact with the source only.
Properties
Property | Description |
|---|---|
| rotationalOffset | The rotational offset angle from the local 'up'. |
| sideArc | The angle of an arc that defines the sides of the platform centered on the local 'left' and 'right' of the effector. Any collision normals within this arc are considered for the 'side' behaviours. |
| surfaceArc | The angle of an arc that defines the surface of the platform centered of the local 'up' of the effector. |
| useOneWay | Should the one-way collision behaviour be used? |
| useOneWayGrouping | Ensures that all contacts controlled by the one-way behaviour act the same. |
| useSideBounce | Should bounce be used on the platform sides? |
| useSideFriction | Should friction be used on the platform sides? |
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. |