Difference between revisions of "LlSetForce"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> example)
m
Line 6: Line 6:
|p1_type=vector|p1_name=force|p1_desc=directional force
|p1_type=vector|p1_name=force|p1_desc=directional force
|p2_type=integer|p2_name=local|p2_desc=boolean, if {{LSLG|TRUE}} uses [[Viewer coordinate frames#Local|local]] axis, if {{LSLG|FALSE}} uses [[Viewer coordinate frames#Region|region]] axis.
|p2_type=integer|p2_name=local|p2_desc=boolean, if {{LSLG|TRUE}} uses [[Viewer coordinate frames#Local|local]] axis, if {{LSLG|FALSE}} uses [[Viewer coordinate frames#Region|region]] axis.
|func_footnote=Continuous force. llApplyImpulse has instantaneous push.
|func_desc=Applies force to the object (if the script is physical)
|func_desc=Applies force to the object (if the script is physical)
|spec
|spec
Line 20: Line 21:
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}
{{LSL DefineRow||[[llSetTorque]]|}}
{{LSL DefineRow||[[llSetTorque]]|}}
{{LSL DefineRow||[[llApplyImpulse]]|Instantaneous force}}
|also_tests
|also_tests
|also_events
|also_events

Revision as of 09:20, 18 February 2008

Summary

Function: llSetForce( vector force, integer local );
0.0 Forced Delay
10.0 Energy

Applies force to the object (if the script is physical)

• vector force directional force
• integer local boolean, if TRUE uses local axis, if FALSE uses region axis.

Continuous force. llApplyImpulse has instantaneous push.

Caveats

Only works on physical objects.

Examples

<lsl>//A simple rocket script. Launches object up when touched. //Sit on it for an interesting ride! default {

    touch_start(integer i) {
         llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
    }
}</lsl>

See Also

Functions

•  llSetForceAndTorque
•  llSetTorque
•  llApplyImpulse Instantaneous force

Deep Notes

Signature

function void llSetForce( vector force, integer local );