“LlGetVel”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: vector llGetVel( ); |参数= 参数:无 |返回值= 返…”) |
|||
| 第30行: | 第30行: | ||
} | } | ||
}//Written by Xaviar Czervik | }//Written by Xaviar Czervik | ||
| − | <pre> | + | </pre> |
2020年8月20日 (四) 10:16的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: vector llGetVel( ); |
| 参数:无 |
| 返回值:返回一个物体的速度矢量。 |
| 注意事项 |
|---|
| All Issues ~ Search JIRA for related Bugs |
| 示例 |
|---|
示例一
//A very simple (and not very effective) way of keeping a physical object in place.
//If you ever want to actually stop an object, use llMoveToTarget(llGetPos(), .1)
default
{
state_entry()
{
vector spd;
{
@loop;
if (llVecMag(spd = llGetVel()) > .001)
{ //We're accelerating...
llApplyImpulse(-spd, 0); //Slow us down.
}
jump loop;
}
}
}//Written by Xaviar Czervik
|
| 相关函数 |
|---|
| llGetAccel
llGetOmega llGetForce--得到物体的力 llGetTorque llGetMass |
| 相关事件 |
|---|
| 无 |