LlWind

来自人工智能助力教育知识百科
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: vector llWind( vector offset );
参数:只有偏移中的x和y坐标是重要的,z分量被忽略。
返回值:返回一个向量,该向量是prim位置+偏移处的风速

•以偏移量表示的局部坐标和偏移量 申请的位置必须在同一地区。

注意事项
示例
示例1
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");
    }
}
相关函数
llCloud
相关事件

Articles

Weather–SL天气信息

Moderated in-world wind