From Second Life Wiki
|LSL Portal||Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials|
- Wind can cause the prim to drift. (server 1.38.4 this appears not to be true)
- Unlike some other characteristics, a buoyancy effect is cancelled if the script that set buoyancy is removed from the prim.
- This function cannot be used to set relative levels of buoyancy in parts of a linked object e.g. to simulate a helium balloon weighted by its string. The most recent call of
llSetBuoyancyin any child prim appears to set the global buoyancy level for the object.
- This function eats energy to keep the object floating. Large objects may not be able to supply enough energy to keep the object floating.
- For better performance, replace by llSetPhysicsMaterial(GRAVITY_MULTIPLIER, gravity, 0.0,0.0,0.0) which doesn't eat energy
For example, replace llSetBuoyancy(1.5) by llSetPhysicsMaterial( GRAVITY_MULTIPLIER, -0.5 ,0.0, 0.0, 0.0 ) to raise an object; replace llSetBuoyancy(1.0) by llSetPhysicsMaterial( GRAVITY_MULTIPLIER, 0.0 ,0.0, 0.0, 0.0 ) to float an object
- When buoyancy is changed, the object briefly continues to be affected by the last value. For example, if buoyancy was set it to 1.5 to raise an object, and whilst moving, buoyancy is changed it to 0.0, the object continues to rise for a moment, because the force is not reversed, only cancelled. With llSetPhysicsMaterial( GRAVITY_MULTIPLIER, -0.5 ,0.0, 0.0, 0.0 ) followed by llSetPhysicsMaterial( GRAVITY_MULTIPLIER, 1.0 ,0.0, 0.0, 0.0 ), the change in movement is immediate, and the object starts to fall at the instant that the second call is done.
function void llSetBuoyancy( float buoyancy );
This related article at the LSL Wiki is able to bring enlightenment.wasn't helpful for you? Maybe the