Difference between revisions of "LlGetMassMKS"
Jump to navigation
Jump to search
(Created page with "{{LSL_Function |func_id=109|func_sleep=0.0|func_energy=10.0 |func=llGetMassMKS|return_type=float |func_footnote |func_desc |return_text=that is the mass (in Kilograms) of object …") |
(Add more description. Add caveat regarding avatar mass. Swap out example, as previous example assumed the system of units used by another function incorrectly.) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{LSL_Function | {{LSL_Function | ||
|func_id= | |func_id=??|func_sleep=0.0|func_energy=?? | ||
|func=llGetMassMKS|return_type=float | |func=llGetMassMKS|return_type=float | ||
|func_footnote | |func_footnote | ||
Line 7: | Line 7: | ||
|spec | |spec | ||
|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. | ||
**Avatar mass is reported to either be unexpectedly low (when measured using [[llGetMass]]) or unexpectedly high (when measured using [[llGetMassMKS]]). This is likely due to the weight being calculated based on a fixed value, with a modifier for height. The fixed value being used is incorrect, likely due to an incorrect density value being used. | |||
|func_footnote='''MKS''' as used in the name of this function is likely a reference to the [https://en.wikipedia.org/wiki/MKS_system_of_units MKS system of units] (Meter, Kilogram, Second), which form the base of SI units (with some minor differences). | |||
|constants | |constants | ||
|examples=< | |examples=<syntaxhighlight lang="lsl2">//Reports an object's mass in Lindograms and Kilograms. | ||
default | default | ||
{ | { | ||
touch_start() | touch_start() | ||
{ | { | ||
llSay(0,"My weight in Lindograms: " + (string)llGetMass() + "\nMy weight in Kilograms: " + (string)llGetMassMKS()); | |||
} | } | ||
} | }</syntaxhighlight> | ||
|helpers | |helpers | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llGetObjectMass]]|Gets the object mass | {{LSL DefineRow||[[llGetObjectMass]]|Gets the object mass (in Lindograms)}} | ||
{{LSL DefineRow||[[llGetForce]]|Gets the objects force}} | {{LSL DefineRow||[[llGetForce]]|Gets the objects force}} | ||
{{LSL DefineRow||[[llGetOmega]]|}} | {{LSL DefineRow||[[llGetOmega]]|}} | ||
Line 26: | Line 27: | ||
{{LSL DefineRow||[[llGetTorque]]|}} | {{LSL DefineRow||[[llGetTorque]]|}} | ||
{{LSL DefineRow||[[llGetAccel]]|}} | {{LSL DefineRow||[[llGetAccel]]|}} | ||
{{LSL DefineRow||[[llGetMass]]|}} | {{LSL DefineRow||[[llGetMass]]|Get the mass of an object (in Lindograms)}} | ||
|also_events | |also_events | ||
|also_tests | |also_tests | ||
|also_articles | |also_articles | ||
|notes | |notes=* the Kilogram value seems to be the {{HoverText|Lindogram|Value reported by llGetMass()}} value multiplied by 100. | ||
|permission | |permission | ||
|negative_index | |negative_index | ||
Line 37: | Line 38: | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
|history = Date of Release [[ Release_Notes/Second_Life_Server/11#11.09.23.241511 | 23/09/2011 ]] | |||
}} | }} |
Latest revision as of 11:39, 8 July 2022
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llGetMassMKS( );0.0 | Forced Delay |
?? | Energy |
Returns a float that is the mass (in Kilograms) of object that script is attached to. Functionally identical to llGetMass except for the unit used in the return value.
MKS as used in the name of this function is likely a reference to the MKS system of units (Meter, Kilogram, Second), which form the base of SI units (with some minor differences).
Caveats
- Attachments do not effect an avatar's mass, only certain Appearance settings.
- Avatar mass is reported to either be unexpectedly low (when measured using llGetMass) or unexpectedly high (when measured using llGetMassMKS). This is likely due to the weight being calculated based on a fixed value, with a modifier for height. The fixed value being used is incorrect, likely due to an incorrect density value being used.
Examples
//Reports an object's mass in Lindograms and Kilograms.
default
{
touch_start()
{
llSay(0,"My weight in Lindograms: " + (string)llGetMass() + "\nMy weight in Kilograms: " + (string)llGetMassMKS());
}
}
Notes
- the Kilogram value seems to be the Lindogram value multiplied by 100.
See Also
Functions
• | llGetObjectMass | – | Gets the object mass (in Lindograms) | |
• | llGetForce | – | Gets the objects force | |
• | llGetOmega | |||
• | llGetVel | |||
• | llGetTorque | |||
• | llGetAccel | |||
• | llGetMass | – | Get the mass of an object (in Lindograms) |