Difference between revisions of "LlGetMass"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 7: Line 7:
|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=<lsl>//A way of making a constant force that returns the same speed visually whatever the object is
|examples=<source lang="lsl2">//A way of making a constant force that returns the same speed visually whatever the object is
default
default
{
{
Line 15: Line 15:
         // This fires the object up at the same m/s whatever the size (or difference!)
         // This fires the object up at the same m/s whatever the size (or difference!)
     }
     }
}//Written by El Taka</lsl>
}//Written by El Taka</source>
NOTE:This example is inaccurate because [[llApplyImpulse]] measures the force in Kilograms. For a more accurate useage it is recommended to use [[llGetMassMKS]] for solving weight compensation.
NOTE:This example is inaccurate because [[llApplyImpulse]] measures the force in Kilograms. For a more accurate useage it is recommended to use [[llGetMassMKS]] for solving weight compensation.
|helpers
|helpers

Revision as of 01:11, 22 January 2015

Summary

Function: float llGetMass( );
0.0 Forced Delay
10.0 Energy

Returns a float that is the mass of object (in Lindograms) that script is attached to.

Caveats

  • Attachments do not effect an avatar's mass, only certain Appearance settings.

Examples

//A way of making a constant force that returns the same speed visually whatever the object is
default
{
    touch_start()
    {
        llApplyImpulse(<0.0, 0.0, 5.0> * llGetMass(), FALSE);
        // This fires the object up at the same m/s whatever the size (or difference!)
    }
}//Written by El Taka
NOTE:This example is inaccurate because llApplyImpulse measures the force in Kilograms. For a more accurate useage it is recommended to use llGetMassMKS for solving weight compensation.

See Also

Functions

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

Deep Notes

Signature

function float llGetMass();