cloth.randomacceleration 随机外力

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

摘要: cloth.randomacceleration 随机外力varrandomacceleration:vector3description描述a random, external acceleration applied to the cloth.施加于布料的外力,一个随机变量。use this to simulate randomly changing ...

cloth.randomacceleration 随机外力

varrandomacceleration:vector3

description描述

a random, external acceleration applied to the cloth.

施加于布料的外力,一个随机变量。

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

用这个来模拟随机大小的力,如随风飘扬的旗帜。

参考:cloth.externalacceleration,interactivecloth.addforceatposition

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

transform.getcomponent().randomacceleration = new vector3(10, 0, 0);

}

}

// simulate wind going trough the x axis.

//模仿来自x轴向上的风

transform.getcomponent(cloth).randomacceleration = vector3 (10, 0, 0);

相关阅读

文章点评
相关文章