LlSetLocalRot

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

Template:Needs Translation/


函数名
Function: llSetLocalRot( rotation rot );
参数:

•旋转腐烂

返回值:设置子基本体相对于根基本体的旋转
注意事项
此函数使脚本休眠0.2秒。
示例
将此脚本放入子prim中,在每次触摸时以1度增量旋转它。
rotation rot_xyzs;
 
default
{
    state_entry()
    {
        vector xyz_angles = <0,1.0,0>; // This defines a 1 degree change on the Y axis
        vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to radians
        rot_xyzs = llEuler2Rot(angles_in_radians); // Convert to a rotation
    }
 
    touch_start(integer s)
    {
        llSetLocalRot(llGetLocalRot()*rot_xyzs); // Apply the increment rotation to the prim's current rotation ...
 
    }
}
相关函数
llGetRot

llGetLocalRot

llGetRootRotation

llGetPrimitiveParams

llGetLinkPrimitiveParams

llSetRot

llSetPrimitiveParams

llSetLinkPrimitiveParams

llSetLinkPrimitiveParamsFast

相关事件