Difference between revisions of "LlGetMass"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
(whitespace is your friend (and makess the example easier to read!)) |
|||
Line 13: | Line 13: | ||
touch_start() | touch_start() | ||
{ | { | ||
llApplyImpulse(<0,0,5*llGetMass() | llApplyImpulse(<0.0, 0.0, 5.0> * llGetMass(), FALSE); // This would fire the object up at the same m/s whatever the size (or difference!) | ||
} | } | ||
}//Written by El Taka</lsl> | }//Written by El Taka</lsl> | ||
Line 19: | Line 19: | ||
|helpers | |helpers | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow|| | {{LSL DefineRow||[[llGetObjectMass]]|Gets the object mass.}} | ||
{{LSL DefineRow||[[llGetForce]]|Gets the objects force}} | {{LSL DefineRow||[[llGetForce]]|Gets the objects force}} | ||
{{LSL DefineRow||[[llGetOmega]]|}} | {{LSL DefineRow||[[llGetOmega]]|}} |
Revision as of 07:18, 20 October 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llGetMass( );109 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a float that is the mass of object that script is attached to.
Caveats
- Attachments do not effect an avatar's mass, only certain Appearance settings.
Examples
<lsl>//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 would fire the object up at the same m/s whatever the size (or difference!) }}//Written by El Taka</lsl>
See Also
Functions
• | llGetObjectMass | – | Gets the object mass. | |
• | llGetForce | – | Gets the objects force | |
• | llGetOmega | |||
• | llGetVel | |||
• | llGetTorque | |||
• | llGetAccel |