function
Function syntax
llSetForce(vector force,// Directional force vector to apply.integer is_local// Boolean. IfTRUE, force is treated as a local vector; ifFALSE, as a global region vector.
);- Energy
- 10
Applies a constant linear force to a physical object. If local is TRUE, force is applied relative to local coordinates; if FALSE, applied relative to region coordinates.
Applies force to the object (if the object is physical)
Continuous force. llApplyImpulse has instantaneous push.
llSetForce(ZERO_VECTOR, 0);Caveats
Section titled “Caveats”Only works on physical objects and attachments (non-physical as well as physical). Used on an attachment, it will apply the force to the avatar.
Examples
Section titled “Examples”Example 1
//A simple rocket script. Launches object up when touched.//Sit on it for an interesting ride!default{ touch_start(integer i) { llSetStatus(STATUS_PHYSICS, TRUE); llSetForce(<0,0,0x7FFFFFFF>, 0); //FLY! }}See also
Section titled “See also”Functions
Section titled “Functions”llSetForceAndTorquellSetTorquellApplyImpulse— Instantaneous force
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.