找回密碼
 注冊帳號

掃一掃,訪問微社區

cloth.randomacceleration 隨機外力

2015-1-4 14:17| 發布者: 楊炎| 查看: 1677| 評論: 0|原作者: 蠻牛|來自: unity3d腳本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);

相關閱讀

文章點評
相關文章
女校游泳队彩金