Don't click here unless you want to be banned.

LSL Wiki : llWater

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org
float llWater(vector offset)

Returns the water height at the current position + offset.

The water height is the same across the whole simulator, so the offset is irrelevant. offset cannot be used to get the water height for a neighboring sim.

This value does not vary with wave motion (if you have ripple water turned on in client preferences), i.e. it cannot be used to make realistic boats that bob with waves. Wave rendering (the water rising and falling) is performed by the client, so everyone is seeing a different version of the water dynamics.

While there is not an llOverWater function to detect if land is above water, this fragment of code works the same way, by using llGround.

// Please note that this is subject to the same attachment irregularities as llGround is.
// See the llGround page for more details.

integer OverWater(vector offset)
{
    return (llGround(offset) < llWater(offset));
}



Functions | Simulator | Land
Comments [Hide comments/form]
Fixed in 1.8.

// Please note that this is subject to the same attachment irregularities as llGround is.
// See the llGround page for more details.

integer OverWater(vector offset)
{
    return (llGround(offset) < llWater(offset));
}
-- ReadyJack (2006-02-28 21:43:11)
Attach a comment to this page: