LlSetForce
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: llSetForce( vector force, integer local ); |
| 参数:
• vector force - 定向力 • integer local - 如果真,力被当作一个局部方向向量,如果假,力被当作一个区域方向向量 |
| 返回值:对对象施加力(如果脚本是物理的)
持续的力量。llApplyImpulse有瞬时推动。 |
| 注意事项 |
|---|
| 只适用于物理支持的对象。只对物理对象和附件有效(非物理的和物理的)。在附件上使用时,它将对化身施加力。 |
| 示例 |
|---|
//一个简单的火箭脚本。被触及时启动对象。
//坐上去享受一次有趣的旅程吧!
default
{
touch_start(integer i)
{
llSetStatus(STATUS_PHYSICS, TRUE);
llSetForce(<0,0,0x7FFFFFFF>, 0); //FLY!
}
}
|
| 相关函数 |
|---|
| llSetForceAndTorque
llApplyImpulse - 瞬时力 |
| 相关事件 |
|---|
| 无 |