用户工具

站点工具


侧边栏

script:unityengine:classes:buoyancyeffector2d:buoyancyeffector2d

BuoyancyEffector2D 2D浮力效果器

class in UnityEngine / Inherits from: Effector2D

Description 描述

Applies forces to simulate buoyancy, fluid-flow and fluid drag.

模拟浮力、流体流动和流动角度应用的力。

When any Collider2D overlap the area defined by the effector, calculations are made to determine if they are below the surfaceLevel. If they are not, no forces are applied. If they are then the effector will apply buoyancy forces in an attempt to move the Collider2D to the surfaceLevel i.e. they will float.

当任意Collider2D与效果器确定区域重叠时,计算以确定它们是否低于水平面。如果不是,不会应用力,否则效果器将应用浮力视图移动Collider2D到水平面。例如,会上浮。

This effector is designed primarily to work with Collider2D that are set as triggers so that Collider2D can overlap the defined area and have buoyancy forces applied to them.

该效果器是主要运行与被设计为触发器的Collider2D,因此,Collider2D可以定义重叠区域并应用浮力。

Variables 变量

angularDragA force applied to slow angular movement of any Collider2D in contact with the effector.
用于减缓与效果器接触任何collider2d角运动的力。
densityThe density of the fluid used to calculate the buoyancy forces.
用来计算浮力的液体的密度。
flowAngleThe angle of the force used to similate fluid flow.
用来模拟流体流动的力的角度。
flowMagnitudeThe magnitude of the force used to similate fluid flow.
用来模拟流体流动的力的大小。
flowVariationThe random variation of the force used to similate fluid flow.
用来模拟流体流动随机变化的力。
linearDragA force applied to slow linear movement of any Collider2D in contact with the effector.
应用到与效果器接触的任意Collider2D线性移动减缓的力。
surfaceLevelDefines an arbitrary horizontal line that represents the fluid surface level.
定义任意表示流体水平面的水平线。
script/unityengine/classes/buoyancyeffector2d/buoyancyeffector2d.txt · 最后更改: 2016/08/02 05:26 (外部编辑)