cloth.externalacceleration 外力

2015-1-4 13:47| 发布者: 杨炎| 查看: 1608| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: cloth.externalacceleration 外力varexternalacceleration:vector3description描述a constant, external acceleration applied to the cloth.施加于布料的外力,一个恒量。use this to simulate constant forces on ...

cloth.externalacceleration 外力

varexternalacceleration:vector3

description描述

a constant, external acceleration applied to the cloth.

施加于布料的外力,一个恒量。

use this to simulate constant forces on the cloth, such as wind waving a flag.

用这个来模拟恒定大小的力,如风可影响旗帜。

参考:cloth.randomacceleration,interactivecloth.addforceatposition

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

transform.getcomponent().externalacceleration = -physics.gravity / 2;

}

}

// make this cloth fall at half speed (if is affected by gravity).

//使布料下落时,受到一半的重力(如果是受重力影响)。

transform.getcomponent(cloth).externalacceleration = -physics.gravity/2;

上一篇:cloth.enabled 启用?下一篇:cloth 布料

相关阅读

文章点评
相关文章