找回密碼
 注冊帳號

掃一掃,訪問微社區

cloth.externalacceleration 外力

2015-1-4 13:47| 發布者: 楊炎| 查看: 1928| 評論: 0|原作者: 蠻牛|來自: unity3d腳本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 布料

相關閱讀

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