Difference between revisions of "LlSetBuoyancy"
Jump to navigation
Jump to search
(<lsl> example) |
|||
Line 12: | Line 12: | ||
*This function eats [[energy]] to keep the object floating. Large objects many not be able to supply enough energy to keep the object floating. | *This function eats [[energy]] to keep the object floating. Large objects many not be able to supply enough energy to keep the object floating. | ||
|constants | |constants | ||
|examples=Makes an object float up slowly (e.g. a red balloon)< | |examples=Makes an object float up slowly (e.g. a red balloon)<lsl>default | ||
default | |||
{ | { | ||
state_entry() | state_entry() | ||
Line 20: | Line 19: | ||
llSetBuoyancy(1.05); | llSetBuoyancy(1.05); | ||
} | } | ||
} | }</lsl> | ||
</ | |||
|helpers | |helpers | ||
|also_functions | |also_functions |
Revision as of 15:42, 19 February 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetBuoyancy( float buoyancy );122 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Sets the buoyancy of the task or object. Requires physics to be enabled.
• float | buoyancy |
if (buoyancy == 0.0) disables
if (buoyancy < 1.0) sinks
if (buoyancy == 1.0) floats
if (buoyancy > 1.0) rises
Caveats
Examples
Makes an object float up slowly (e.g. a red balloon)<lsl>default {
state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetBuoyancy(1.05); }}</lsl>