Difference between revisions of "LlDetectedTouchNormal/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
|func_id=340|func_sleep=0.0|func_energy=10.0
|func_id=340|func_sleep=0.0|func_energy=10.0
|func=llDetectedTouchNormal
|func=llDetectedTouchNormal
|return_type=vector|return_text=touch イベントが発生した面の法線 (面の垂線)
|func_desc=touch イベントが発生した面の法線 (面の垂線)を vector で返します。 {{LSLG/ja|llDetectedTouchBinormal}} と同様、この情報は touch された場所の [http://ja.wikipedia.org/wiki/%E6%8E%A5%E3%83%99%E3%82%AF%E3%83%88%E3%83%AB%E7%A9%BA%E9%96%93 接ベクトル空間] を見つけるのに使用することができます。
|return_type=|return_text=
|p1_type=integer|p1_name=index
|p1_type=integer|p1_name=index
|func_footnote={{LSLGC/ja|Touch|touch}} 系イベントでのみ有効です。touch されたプリムとイベントが処理されるプリムは別かもしれません。これは {{LSLG/ja|llDetectedLinkNumber}} でチェックできます。同様に、どの面が touch されたかは {{LSLG/ja|llDetectedTouchFace}} でチェックできます。
|func_footnote={{LSLGC/ja|Touch|touch}} 系イベントでのみ有効です。touch されたプリムとイベントが処理されるプリムは別かもしれません。これは {{LSLG/ja|llDetectedLinkNumber}} でチェックできます。同様に、どの面が touch されたかは {{LSLG/ja|llDetectedTouchFace}} でチェックできます。{{PBR}}3 番目の接線ベクトルを調べるには、このベクトルと [[llDetectedTouchBinormal/ja|従法線]] の [[LSL Cross Product|クロス積]] を計算してください。
|func_desc
|func_desc
|spec
|spec
Line 14: Line 15:
** この関数を呼び出したイベントが {{LSLGC/ja|Touch|touch}} 系イベントでない。
** この関数を呼び出したイベントが {{LSLGC/ja|Touch|touch}} 系イベントでない。
|examples
|examples
|helpers
|helpers=
<source lang="lsl2">touch_start(integer total_number){
    // プリムを回転させ、タッチされた場所が上を指すようにします
    llSetRot(llGetRot()*llRotBetween(llDetectedTouchNormal(0),<0,0,1>));
}</source>
|related
|related
|also_functions=
|also_functions=
Line 31: Line 36:
|history=* Introduced in Viewer {{SVN|870|rev=92872|branch=Release|anchor=file14|date=Wednesday, 23 July 2008}}, no server support, no viewer binary released.
|history=* Introduced in Viewer {{SVN|870|rev=92872|branch=Release|anchor=file14|date=Wednesday, 23 July 2008}}, no server support, no viewer binary released.
*Server support available on preview grid in Second Life Beta Server 1.24, client support in Preview Grid viewer 1.20.15 (93532)  
*Server support available on preview grid in Second Life Beta Server 1.24, client support in Preview Grid viewer 1.20.15 (93532)  
|cat1=Touch/ja
|cat1=Touch
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 15:31, 25 February 2016

要約

関数: llDetectedTouchNormal( integer index );

touch イベントが発生した面の法線 (面の垂線)を vector で返します。 llDetectedTouchBinormal と同様、この情報は touch された場所の 接ベクトル空間 を見つけるのに使用することができます。

• integer index 探知情報の番号

index には 負のインデックス を使用できません。 touch 系イベントでのみ有効です。touch されたプリムとイベントが処理されるプリムは別かもしれません。これは llDetectedLinkNumber でチェックできます。同様に、どの面が touch されたかは llDetectedTouchFace でチェックできます。3 番目の接線ベクトルを調べるには、このベクトルと 従法線クロス積 を計算してください。

警告

  • index が正常なインデックス範囲を外れていても、スクリプトはエラー表示を出さずに処理を続けます。
  • 以下の場合は TOUCH_INVALID_VECTOR が返されます:
    • アバターのビューアが touch 面の検出に対応していない。
    • touch 点がプリムの表面から外れた。
    • この関数を呼び出したイベントが touch 系イベントでない。
All Issues ~ Search JIRA for related Bugs

サンプル

便利なスニペット

touch_start(integer total_number){
    // プリムを回転させ、タッチされた場所が上を指すようにします
    llSetRot(llGetRot()*llRotBetween(llDetectedTouchNormal(0),<0,0,1>));
}

関連項目

イベント

•  touch_start
•  touch
•  touch_end

関数

•  llDetectedLinkNumber
•  llDetectedTouchFace
•  llDetectedTouchST
•  llDetectedTouchUV
•  llDetectedTouchPos
•  llDetectedTouchBinormal

記事

•  検出

特記事項

経緯

Search JIRA for related Issues

Signature

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