Legacy Documentation: Version 5.0
Platform Effector 2D
Physics HOWTOs

Surface Effector 2D

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

Sumbission failed

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

Close

Cancel

Switch to Scripting

The Surface Effector 2D applies tangent forces along the surfaces of colliders.

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 can be used to create constant speed elevators and moving surfaces.

The Surface Effector 2D Inspector
The Surface Effector 2D Inspector

Properties

Property: Function:
Collider Mask The mask used to select specific layers allowed to interact with the effector.
Speed The speed to be maintained along the surface.
Speed Variation A random increase in the speed (anywhere between 0 and the Speed Variation value) will be applied to the speed. If a negative number is entered here, a random reduction in the speed will be applied.
Platform Effector 2D
Physics HOWTOs