Difference between revisions of "LlSetForce"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
Lady Sumoku (talk | contribs) m (Replaced old <LSL> block with <source lang="lsl2">) |
||
Line 12: | Line 12: | ||
|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. | |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. | ||
|constants | |constants | ||
|examples=< | |examples=<source lang="lsl2">//A simple rocket script. Launches object up when touched. | ||
//Sit on it for an interesting ride! | //Sit on it for an interesting ride! | ||
default | default | ||
Line 21: | Line 21: | ||
llSetForce(<0,0,0x7FFFFFFF>, 0); //FLY! | llSetForce(<0,0,0x7FFFFFFF>, 0); //FLY! | ||
} | } | ||
}</ | }</source> | ||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}} | |also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}} |
Revision as of 14:43, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetForce( vector force, integer local );64 | Function ID |
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 force is treated as a local directional vector, if FALSE force is treated as a region directional vector |
Continuous force. llApplyImpulse has instantaneous push.
Caveats
- Only works in physics-enabled objects.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
//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
Functions
• | llSetForceAndTorque | |||
• | llSetTorque | |||
• | llApplyImpulse | – | Instantaneous force |