Difference between revisions of "LlNavigateTo/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 2: Line 2:
|inject-2={{LSL Function/position|pos|region=*}}
|inject-2={{LSL Function/position|pos|region=*}}
|func=llNavigateTo
|func=llNavigateTo
|func_desc=Directs an object to travel to a defined position in the region or adjacent regions.
|func_desc=オブジェクトに対して、リージョンまたは隣接するリージョンの特定の位置に移動するよう指示します。
|func_footnote=Adjacent regions can be reached by extending the position vector into the nearby region.
|func_footnote=隣接するリージョンには、位置ベクトルを近くのリージョンに延長することで到達できます。
|p1_type=vector
|p1_type=vector
|p1_name=pos
|p1_name=pos
|p1_desc= for the character to navigate to.
|p1_desc= キャラクターがナビゲートする位置。
|p1_hover= for the character to navigate to.
|p1_hover= キャラクターがナビゲートする位置。
|p2_type=list
|p2_type=list
|p2_subtype=instructions
|p2_subtype=instructions
|p2_name=options
|p2_name=options
|p2_desc=List of parameters to control the type of pathfinding used.
|p2_desc=使用されるパスファインディングのタイプを制御するためのパラメータのリスト
|constants={{LSL_Constants/NavigateTo}}
|constants={{LSL_Constants/NavigateTo/ja}}
|caveats=
|caveats=
* Must use llCreateCharacter first or the function will fail with a viewer error.
* 関数がビューアエラーで失敗する可能性があるため、まず最初にllCreateCharacterを使用する必要があります。
* Vertical positions specified for any vectors should be chosen to be as close as possible to the actual height of the surface requested. Large difference between the provided vertical position and the actual terrain/object will result in failure of the behavior.
* 任意のベクトルに指定された垂直位置は、要求された表面の実際の高さにできるだけ近い値を選択する必要があります。提供された垂直位置と実際の地形やオブジェクトの高さの大きな差異は、動作の失敗につながります。
* If you want to chase an agent or object as per the example below, it's much more elegant and less sim resource intensive to use [[llPursue]] instead.
* 以下の例のようにエージェントやオブジェクトを追跡したい場合、[[llPursue/ja]]を使用する方が良くて、シミュレータのリソースをより効率的に使用できます。
|examples=
|examples=
<source lang="lsl2">
<source lang="lsl2">

Revision as of 12:08, 22 November 2023

要約

関数: llNavigateTo( vector pos, list options );

オブジェクトに対して、リージョンまたは隣接するリージョンの特定の位置に移動するよう指示します。

• vector pos position in region coordinates キャラクターがナビゲートする位置。
• list options 使用されるパスファインディングのタイプを制御するためのパラメータのリスト

隣接するリージョンには、位置ベクトルを近くのリージョンに延長することで到達できます。

オプション パラメータ デフォルト 説明
FORCE_DIRECT_PATH 1 integer boolean ] FALSE ] キャラクターをposに直線的にナビゲートさせます。TRUEまたはFALSEに設定できます。

警告

  • 関数がビューアエラーで失敗する可能性があるため、まず最初にllCreateCharacterを使用する必要があります。
  • 任意のベクトルに指定された垂直位置は、要求された表面の実際の高さにできるだけ近い値を選択する必要があります。提供された垂直位置と実際の地形やオブジェクトの高さの大きな差異は、動作の失敗につながります。
  • 以下の例のようにエージェントやオブジェクトを追跡したい場合、llPursue/jaを使用する方が良くて、シミュレータのリソースをより効率的に使用できます。
All Issues ~ Search JIRA for related Bugs

サンプル

vector last_touched_pos;
key last_touched_key;

default
{
    state_entry()
    {
        llCreateCharacter([CHARACTER_DESIRED_SPEED, 50.0]);
    }

    touch_start(integer total_number)
    {
        last_touched_key = llDetectedKey(0);
        last_touched_pos = llList2Vector(llGetObjectDetails(last_touched_key, [OBJECT_POS]), 0);
        llNavigateTo(last_touched_pos, []);
        llSetTimerEvent(0.2);
    }

    timer()
    {
        vector last_touched_pos_now = llList2Vector(llGetObjectDetails(last_touched_key, [OBJECT_POS]), 0);
        if ( llVecDist(last_touched_pos_now, last_touched_pos) > 1 )
        {
            last_touched_pos = last_touched_pos_now;
            llNavigateTo(last_touched_pos, []);
        }
    }
}

注意点

  • FORCE_DIRECT_PATH can be used to rescue characters that have somehow fallen off the navigable zone as it doesn't use the navmesh.

(Needs verification.)

  • The position vector can be set outside the current region by using extended range region coordinates: e.g., to go to the SE corner of the region to the East of the current one, you could llNavigateTo(<0.0, 512.0, 0.0>, []);

特記事項

経緯

Date of Release 31/07/2012

Search JIRA for related Issues

Signature

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