Syntax

vector llWind( vector offset );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

vector offset
offset relative to the prim's position and expressed in local coordinates

The requested position needs to be in the same region.

Only the x and y coordinates in offset are important, the z component is ignored.

Return value

Returns a vector that is the wind velocity at the prim's position + offset

Examples

default
{
    touch_start(integer num)
    {
        llSay(0, "Wind velocity: " + (string)llWind(ZERO_VECTOR));
    }
}
// wind interpretation as angle and speed
default
{
    state_entry()
    {
        vector windVector = llWind( ZERO_VECTOR);
        float windSpeed = llVecMag( windVector);
        float windDirection = llAtan2( windVector.y, windVector.x);
        integer compassWind = ( 450 - (integer)( RAD_TO_DEG*windDirection))%360;
        llOwnerSay( "\nWind direction: "+(string)compassWind+"°\nWind speed: "+(string)windSpeed+" m/S");
    }
}

Notes

See also

Functions

Articles

Deep notes

Issues