用户工具

站点工具


侧边栏



Unity3D中文文档

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.

当源2D碰撞器触发,该效应器将会应用力到目标2D碰撞器与源碰撞器重叠部分。当源2D碰撞器不触发时,效应器将会仅应用力到目2D碰撞器接触的部分。

This effector is designed primarily to work with source Collider2D that are set as triggers so that target Collider2D can overlap the defined area.

该效应器设计首要作用于源2D碰撞器,设置作为触发器因此目标2D碰撞器可以与定义区域重叠。

Variables 变量

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