LlGetAgentSize/ja - Second Life Wiki

LlGetAgentSize/ja

From Second Life Wiki

Jump to: navigation, search

関数: vector llGetAgentSize( key id );

要求されたidのアバタの大きさのvector値を返します。

• key id UUIDのアバタは同じリージョンです


エージェントidは要求するオブジェクトと同じリージョンでなければならず、居ない場合はZERO_VECTORが返されます。

 
//A simple script that makes a box hover above the owner's head.
default {
    state_entry(integer i) {
        key owner = llGetOwner();
        vector pos = llList2Vector(llGetObjectDetails(owner, [OBJECT_POS]),0);
        vector agent = llGetAgentSize(owner);
        pos.z += 0.5 + agent.z / 2;//"pos" needs to be adjusted so it appears above the owner.
        if(agent)//makes sure it found the owner, a zero vector evaluates as false
            llSetPos(pos);
    }
    touch_start(integer num)
    {
        llResetScript();
    }
}
 

ノート

これはアバターが同じリージョンにいるかどうかのテストとして優れた方法です。

関連項目