Difference between revisions of "LlGetObjectMass"
Jump to navigation
Jump to search
m |
Anylyn Hax (talk | contribs) |
||
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
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llGetObjectMass( key id );295 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a float that is the mass of id
• key | id | – | Agent or object |
Caveats
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. |