Cloth.randomAcceleration 随机外力

var randomAcceleration : 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

// Simulate wind going trough the X axis.  
//模仿来自X轴向上的风  

transform.GetComponent(Cloth).randomAcceleration = Vector3 (10, 0, 0);

最后修改:2011年1月18日 Tuesday 21:41

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。