### 侧边栏

script:unityengine:classes:pointeffector2d:pointeffector2d

# PointEffector2D 2D点效果器

class in UnityEngine/Inherits from: Effector2D

#### Description 描述

Applies forces to attract/repulse against a point.

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.

### Variables 变量

 angularDrag The angular drag to apply to rigid-bodies. 应用于刚体的角度阻力。 distanceScale The scale applied to the calculated distance between source and target. 该缩放应用于计算原点与目标点之间的距离。 drag The linear drag to apply to rigid-bodies. 应用于刚体的线性阻力。 forceMagnitude The magnitude of the force to be applied. 应用的力的大小。 forceMode The mode used to apply the effector force. 该模式用来施加效应器力。 forceSource The source which is used to calculate the centroid point of the effector. The distance from the target is defined from this point. 来源是指用来计算效应器的质心点。距离目标是从这点定义。 forceTarget The target for where the effector applies any force. 效应器施加任何力的目标。 forceVariation The variation of the magnitude of the force to be applied. 0和forceVariation 之间的随机值被使用并且添加力的大小。forceVariation 可以是负数去随意减少力的大小。
script/unityengine/classes/pointeffector2d/pointeffector2d.txt · 最后更改: 2016/08/02 05:31 (外部编辑)