Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PlatformEffector2D

Applies "platform" behaviour such as one-way collisions etc.
Read time 6 minutesLast updated 2 days ago

Definition

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

rotationalOffsetThe rotational offset angle from the local 'up'.
sideArcThe 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.
surfaceArcThe angle of an arc that defines the surface of the platform centered of the local 'up' of the effector.
useOneWayShould the one-way collision behaviour be used?
useOneWayGroupingEnsures that all contacts controlled by the one-way behaviour act the same.
useSideBounceShould bounce be used on the platform sides?
useSideFrictionShould friction be used on the platform sides?

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.