Skip to content
lsl.devlsl.devLSL Dev

llWind

function
Function syntax
vector llWind(
  1. vector offset// Offset relative to the prim's position, expressed in local coordinates.
);
Returns
vector
Energy
10

Returns a vector representing the wind velocity at the prim's position offset by the vector offset.

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

How to use
vector result = llWind(ZERO_VECTOR);
Example 1
default
{
touch_start(integer num)
{
llSay(0, "Wind velocity: " + (string)llWind(ZERO_VECTOR));
}
}
Example 2
// 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");
}
}

SVC-3131: llWind() and viewer wind effects do not match

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlWind, by Linden Research, Inc. and contributing residents.View contributors and history.

Built from these wiki pages, as imported:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.