Difference between revisions of "LlGetMass"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 8: Line 8:
|caveats=*Attachments do not effect an avatar's mass, only certain Appearance settings.
|caveats=*Attachments do not effect an avatar's mass, only certain Appearance settings.
|constants
|constants
|examples
|examples=<lsl>//A way of making a constant force that returns the same speed visually whatever the object is
default
{
    touch_start()
    {
        llApplyImpulse(<0,0,5*llGetMass()>,FALSE); // This would fire the object up at the same m/s whatever the size (or difference!)
    }
}//Written by El Taka</lsl>
 
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 06:54, 20 October 2008

Summary

Function: float llGetMass( );

Returns a float that is the mass of object that script is attached to.

Caveats

  • Attachments do not effect an avatar's mass, only certain Appearance settings.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>//A way of making a constant force that returns the same speed visually whatever the object is default {

   touch_start()
   {
       llApplyImpulse(<0,0,5*llGetMass()>,FALSE); // This would fire the object up at the same m/s whatever the size (or difference!)
   }
}//Written by El Taka</lsl>

See Also

Functions

•  llGetObjectMass Gets the object mass.
•  llGetForce Gets the objects force
•  llGetOmega
•  llGetVel
•  llGetTorque
•  llGetAccel

Deep Notes

Search JIRA for related Issues

Signature

function float llGetMass();