Difference between revisions of "LlSetBuoyancy"

From Second Life Wiki
Jump to navigation Jump to search
(Example)
Line 11: Line 11:
*Unlike some other characteristics, this is cancelled if the script that set buoyancy is removed from the prim.
*Unlike some other characteristics, this is cancelled if the script that set buoyancy is removed from the prim.
|constants
|constants
|examples
|examples=Makes to fly an object (e.g. a red balloon)<pre>
default
{
    state_entry()
    {
        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetBuoyancy(1.05);
    }
}
</pre>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 13:05, 3 April 2007

Summary

Function: llSetBuoyancy( float buoyancy );

Set the tasks buoyancy

• float buoyancy

if (buoyancy == 0.0) disables
if (buoyancy < 1.0) sinks
if (buoyancy == 1.0) floats
If (buoyancy > 1.0) rises

Caveats

  • Wind can cause the prim to drift.
  • Unlike some other characteristics, this is cancelled if the script that set buoyancy is removed from the prim.
All Issues ~ Search JIRA for related Bugs

Examples

Makes to fly an object (e.g. a red balloon)
default
{
    state_entry()
    {
        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetBuoyancy(1.05);
    }
}

Deep Notes

Search JIRA for related Issues

Signature

function void llSetBuoyancy( float buoyancy );