LlAxisAngle2Rot/ja - Second Life Wiki

LlAxisAngle2Rot/ja

From Second Life Wiki

Jump to: navigation, search

関数: rotation llAxisAngle2Rot( vector axis, float angle );

axisに関するangleが生成されてのrotation値を返します。

• vector axis
• float angle ラジアンで表現されます


axis正常化すべきです。

default
{
    state_entry()
    {
        vector axis = <0.0, 0.0, 1.0>;
        float angle = 90.0 * DEG_TO_RAD;
        rotation rot = llAxisAngle2Rot(axis, angle);
        vector euler = llRot2Euler(rTest) * RAD_TO_DEG;
 
        llOwnerSay((string) euler);
        //Says <0.0, 0.0, 90.0> since it is rotating 90 degrees on the Z axis caused by the 1.0 placed in the Z vector spot. 
    }
}

関連項目

関数

•  llRot2Angle
•  llRot2Axis