Difference between revisions of "LlGetObjectMass"

From Second Life Wiki
Jump to navigation Jump to search
m (cleanup)
Line 11: Line 11:
|constants
|constants
|examples=
|examples=
Avatar mass is not a constant of 1.954922 Lindens.  Avatar mass as of Second Life Server 1.18.6.76747 server code is now dynamic and relative to the Avatar's size/shape.  *Note* Attached objects still do not effect avatar mass.  - 1/12/08 -
<lsl>default
<lsl>default
{
{
Line 19: Line 18:
     }
     }
}//Anylyn Hax 15:02, 28 July 2007 (PDT)</lsl>
}//Anylyn Hax 15:02, 28 July 2007 (PDT)</lsl>
Mass [m] is the quantity of materia that a avatar has inside itself, and is expressed in Kg (Kilogramms).
The Weight [G] is a Force, expressed in N (Newtons), and it is m * g, where g is the the gravitational atraction (g = 9.81 on Earth).
|helpers
|helpers
|also_functions=
|also_functions=
Line 27: Line 24:
|also_events
|also_events
|also_articles
|also_articles
|history=Prior to server code version 1.18.6.76747 avatar mass was fixed at 1.954922 Lindens.
|history=Prior to server code version 1.18.6.76747 avatar mass was fixed at 1.954922 Lindens. It is now relative to Avatar shape/size.
|notes
|notes=
* Mass for Avatars is relative to shape/size, and unaffected by attachments.
* Mass[m] is the quantity of material that something contains, and is expressed in Kg (Kilogramms). The Weight [G] is a Force, expressed in N (Newtons), and it is m * g, where g is the the gravitational atraction (g = 9.81 on Earth). Mass is NOT weight or density. Ex. objects with bouancy still have mass and still require energy to move.
|cat1=Object
|cat1=Object
|cat2
|cat2

Revision as of 14:20, 19 February 2008

Summary

Function: float llGetObjectMass( key id );
0.0 Forced Delay
10.0 Energy

Returns a float that is the mass of id

• key id Avatar or object in the sim

Caveats

  • Returns zero if id is not found in the sim.

Examples

<lsl>default {

   touch(integer n)
   {
       llSay(0, llDetectedName(0) + " your mass is " + (string)llGetObjectMass( llDetectedKey(0)) + " Lindens.");
   }
}//Anylyn Hax 15:02, 28 July 2007 (PDT)</lsl>

Notes

  • Mass for Avatars is relative to shape/size, and unaffected by attachments.
  • Mass[m] is the quantity of material that something contains, and is expressed in Kg (Kilogramms). The Weight [G] is a Force, expressed in N (Newtons), and it is m * g, where g is the the gravitational atraction (g = 9.81 on Earth). Mass is NOT weight or density. Ex. objects with bouancy still have mass and still require energy to move.

See Also

Functions

•  llGetMass Gets the current object mass.

Deep Notes

History

Prior to server code version 1.18.6.76747 avatar mass was fixed at 1.954922 Lindens. It is now relative to Avatar shape/size.

Signature

function float llGetObjectMass( key id );