# LlApplyImpulse/zh-Hant

 LSL 入口網站 | 函式 | 事件 | 資料類型 | 運算子 | 常數 | 流程控制 | LSL 程式庫 | 教學課程

 72 函式ID 0 延遲 10 能量

Applies impulse to object

 • vector force • integer local – boolean, if TRUE, force is treated as a local directional vector instead of region directional vector.

Instantaneous impulse. llSetForce has continuous push. "Instantaneous" seems to mean a one second impulse, as an application of a force (in newtons) equal to the object's mass (in kg) for one second will accelerate it to a velocity of 1 (in meters per second), which appears to be what happens with this function.

## 注意事項

• Object must be physical.
• The force magnitude is capped at 20.000.
• The force magnitude is scaled by the object's energy.
All Issues ~ Search JIRA for related Bugs

## 範例

<lsl> //Rez an object, and drop this script in it. //This will launch it at the owner. default {

```    state_entry() {
list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
if(p != []) {
llSetStatus(STATUS_PHYSICS, TRUE);
vector pos = llList2Vector(p, 0);
vector direction = llVecNorm(pos - llGetPos());
llApplyImpulse(direction * 100, 0);
}
}
```

}

</lsl>

## 參照

### 函式

 • llApplyRotationalImpulse • llSetForce – Set continuous force