Difference between revisions of "LlSetForce"

From Second Life Wiki
Jump to navigation Jump to search
m
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_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

Revision as of 10:01, 22 April 2009

Summary

Function: llSetForce( vector force, integer local );

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 and attachments (non-physical as well as physical). Used on an attachment, it will apply the force to the avatar.

All Issues ~ Search JIRA for related Bugs

Examples

<lsl>//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!
   }
}</lsl>

See Also

Functions

•  llSetForceAndTorque
•  llSetTorque
•  llApplyImpulse Instantaneous force

Deep Notes

Search JIRA for related Issues

Signature

function void llSetForce( vector force, integer local );