Difference between revisions of "LlMoveToTarget/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{multi-lang}} {{LSL Function/damping/ja|tau}}{{LSL_Function/ja |func_id=70|func_sleep=0.0|func_energy=10.0 |func=llMoveToTarget |p1_type=vector|p1_name=target|p1_desc=[[Viewer coordinate ...)
 
m
Line 1: Line 1:
{{multi-lang}}
{{LSL Function/damping/ja|tau}}{{LSL_Function/ja
{{LSL Function/damping/ja|tau}}{{LSL_Function/ja
|func_id=70|func_sleep=0.0|func_energy=10.0
|func_id=70|func_sleep=0.0|func_energy=10.0
Line 48: Line 47:
|notes
|notes
|cat1
|cat1
|cat2=Physics/ja
|cat2=Physics
|cat3=Movement/ja
|cat3=Movement
|cat4=Target/ja
|cat4=Target
|cat5
|cat5
|cat6
|cat6
}}
}}

Revision as of 23:46, 18 April 2008

要約

関数: llMoveToTarget( vector target, float tau );

(スクリプトが物理の場合)tau秒でtargetに著しく勢いを落とします。

• vector target リージョン位置
• float tau 臨界減衰までにかける秒数

維持しているllStopMoveToTargetを使うtargetの位置からオブジェクトを停止します。
llLookAtllRotLookAtを使う同じ方法の回転を変えます。

サンプル

プリムオーナーを追従するプリムに、スクリプトをドロップします。

default
{
    state_entry()
    {
        vector pos = llGetPos();
        llSetStatus(STATUS_PHYSICS, TRUE);
        // Little pause to allow server to make potentially large linked object physical.
        llSleep(0.1);
        llMoveToTarget(pos,0.4);
        // Look for owner within 20 meters in 360 degree arc every 1 seconds.
        llSensorRepeat("", llGetOwner(), AGENT, 20.0, PI,1.0);
    }
    sensor(integer total_number)
    {
        // Get position of detected owner
        vector pos = llDetectedPos(0);
        // Offset back one metre in X and up one metre in Z based on world coordinates.
        // Offset relative to owner is possible but beyond the scope of this example.
        vector offset =<-1,0,1>;
        pos+=offset;
        llMoveToTarget(pos,0.4);     
    }
}

関連項目

関数

•  llStopMoveToTarget
•  llLookAt
•  llRotLookAt
•  llTarget

特記事項

Search JIRA for related Issues

Signature

function void llMoveToTarget( vector target, float tau );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。