Difference between revisions of "LlGetObjectMass"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=<pre>
This one of my favorite, because it is a example of usless function.
Every avatar, regardless how tall he is, or how much soup he has got from his mama, weight 19.177782 N. (1.954922 Kg)
Try it ;
default
{
  touch(integer n)
  {
  llSay(0, llDetectedName(0) + " your weight is " + (string)(llGetObjectMass( llDetectedKey(0) ) * 9.81) + " N ");
  }
}
Because 50% of my students don't know difference between mass and weight, I whould like to explain it here again.
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.
On the Earth the g is 9.81 m/s², on the Moon 1.63 m/s², on Venus 8.60 m/s², on Mars 3.70 m/s² and on the Sun 274 m/s².
</pre>
Anylyn Hax 15:02, 28 July 2007 (PDT)
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 15:02, 28 July 2007

Summary

Function: float llGetObjectMass( key id );

Returns a float that is the mass of id

• key id Agent or object

Examples

This one of my favorite, because it is a example of usless function.
Every avatar, regardless how tall he is, or how much soup he has got from his mama, weight 19.177782 N. (1.954922 Kg)
Try it ;
default
{
  touch(integer n)
  {
   llSay(0, llDetectedName(0) + " your weight is " + (string)(llGetObjectMass( llDetectedKey(0) ) * 9.81) + " N ");
  }
}
Because 50% of my students don't know difference between mass and weight, I whould like to explain it here again.
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.
On the Earth the g is 9.81 m/s², on the Moon 1.63 m/s², on Venus 8.60 m/s², on Mars 3.70 m/s² and on the Sun 274 m/s².
Anylyn Hax 15:02, 28 July 2007 (PDT)

See Also

Functions

•  llGetMass Gets the current object mass.

Deep Notes

Search JIRA for related Issues

Signature

function float llGetObjectMass( key id );