Difference between revisions of "Raycast One (LogiX node)/ja"

From Neos Wiki
Jump to navigation Jump to search
(Created page with "<code>HitTriggers</code>は、コライダー<code>Type</code>フィールドが<code>Trigger</code>または<code>HapticTrigger</code>として設定されているコライ...")
(Updating to match new version of source page)
 
(9 intermediate revisions by one other user not shown)
Line 36: Line 36:
  
  
The <code>UsersOnly</code> determines whether colliders which do not have an active user are considered valid hit targets. Defaults to false, in which case all colliders are considered valid hit targets (depending on other factors). However, if set to true, only colliders with an active user (i.e. are parented under a user's slot hierarchy) are considered valid hit targets.
+
<code>UsersOnly</code>は、アクティブなユーザーを持たないコライダーを有効なヒットターゲットとみなすかどうかを決定します。デフォルトはfalseで、この場合すべてのコライダーが有効なヒットターゲットとみなされます(他の要因に依存します)。しかし、trueに設定すると、アクティブなユーザーを持つ(つまり、ユーザーのスロット階層の下で子になっている)コライダーだけが、有効なヒットターゲットとみなされます。
  
  
The <code>DebugDuration</code> input determines how long the raycast debug visual persists. This value is in seconds however if set to 0 (the default) the visual will persist for 1 frame. If set to a negative value no debug visual is drawn.
+
<code>DebugDuration</code> 入力は、レイキャストデバッグビジュアルが持続する時間を決定します。この値は秒単位ですが、0 (デフォルト) に設定された場合、ビジュアルは1フレーム間持続します。負の値に設定された場合、デバッグビジュアルは描画されません。
  
  
The <code>Root</code> input defines the slot relative to whose local coordinate space the <code>Origin</code>, <code>Direction</code>, and <code>MaxDistance</code> are calcluated.
+
<code>Root</code> は、<code>Origin</code>, <code>Direction</code>, <code>MaxDistance</code> が計算されるローカル座標空間の基準スロットを定義する入力項目です。
  
=== Outputs ===
+
=== 出力 ===
The <code>OnHit</code> output fires an impulse if a valid target collider is hit when a ray is cast.
+
<code>OnHit</code> 出力は、レイがキャストされたときに有効なターゲットコライダーがヒットした場合にインパルスを出力します。
  
  
The <code>OnMiss</code> output fires an impulse if no valid targets are hit when a ray is cast.
+
<code>OnMiss</code> 出力は、レイがキャストされたときに有効なターゲットがヒットしなかった場合、インパルスを出力します。
  
  
The <code>HitCollider</code> output provides the first valid target collider hit along the path of the raycast. This value is only available for the duration of the impulse chain started from <code>OnHit</code>. Default is ''null''.
+
<code>HitCollider</code> の出力は、レイキャストのパスに沿ってヒットした最初の有効なターゲットコライダーを提供します。この値は、<code>OnHit</code>から始まるインパルス連鎖の間のみ有効です。デフォルトは、''null''です。
  
  
The <code>HitDistance</code> output provides the global distance between the raycast origin and the <code>HitPoint</code>. This value is only available for the duration of the impulse chain started from <code>OnHit</code>. Default is 0.
+
<code>HitDistance</code> の出力は、レイキャストの原点と <code>HitPoint</code> の間のグローバルな距離を出力します。この値は、<code>OnHit</code>から始まるインパルス連鎖の間のみ有効です。デフォルトは0です。
  
  
The <code>HitPoint</code> output provides the global coordinates of the point where raycast first intersects with the <code>HitCollider</code>. This value is only available for the duration of the impulse chain started from <code>OnHit</code>. Default is [0;0;0].
+
<code>HitPoint</code> の出力は、レイキャストが最初に <code>HitCollider</code> と交差する点のグローバル座標を提供します。この値は、<code>OnHit</code>から始まるインパルス連鎖の間のみ有効です。デフォルトは[0;0;0]です。
  
  
The <code>HitNormal</code> output provides the normal vector for the intersection of the raycast and the <code>HitCollider</code>.
+
<code>HitNormal</code> の出力は、レイキャストと <code>HitCollider</code> の交点に対する法線ベクトルを出力します。
  
  
The <code>HitTriangleIndex</code> outputs the index of the mesh triangle which was hit in the case that the <code>HitCollider</code> is a [[MeshCollider (Component)]].
+
<code>HitTriangleIndex</code>は、<code>HitCollider</code>[[MeshCollider (Component)]] である場合、ヒットしたメッシュのポリゴンのインデックスを出力するものです。
  
=== Notes ===
+
=== 注意事項 ===
Colliders will generally be valid hit targets for raycasts unless their <code>Type</code> enum field is set to <code>Trigger</code>, <code>HapticTrigger</code>, or <code>HapticSampler</code>, though see details for the <code>HitTriggers</code> input. Colliders will ''not'' be valid targets if the <code>IgnoreRaycasts</code> bool is set to false on the collider component.
+
コライダーは、その <code>Type</code> enum フィールドが <code>Trigger</code>, <code>HapticTrigger</code>, <code>HapticSampler</code> に設定されていない限り、通常レイキャストに対する有効なヒットターゲットとなります、<code>HitTriggers</code>入力の詳細を参照してください。コライダーコンポーネントの <code>IgnoreRaycasts</code> bool false に設定されている場合、コライダーは有効なターゲットではなくなります。
  
== Examples ==
+
== ==
  
* [https://www.youtube.com/watch?v=FwNwneCtav0 Neos VR: BasicTooltip with RayCastOne] by [[User:ProbablePrime|ProbablePrime]]
+
* [https://www.youtube.com/watch?v=FwNwneCtav0 Neos VR: RayCastOneを使った基本的なツールチップ] by [[User:ProbablePrime|ProbablePrime]]
  
== Node Menu ==
+
== ノードメニュー ==
 
[[Category:LogiX{{#translation:}}|Raycast One]]
 
[[Category:LogiX{{#translation:}}|Raycast One]]
 
[[Category:LogiX:Physics{{#translation:}}|Raycast One]]
 
[[Category:LogiX:Physics{{#translation:}}|Raycast One]]
{{:NodeMenu-Physics{{#translation:}}}}
+
{{:NodeMenu-Physics}}

Latest revision as of 03:54, 20 February 2022

Other languages:
English • ‎日本語 • ‎한국어
Raycast One
'Raycast One' LogiX node
Inputs
  Impulse Raycast
  Float3 Origin
  Float3 Direction
  Float MaxDistance
  Bool HitTriggers
  Bool UsersOnly
  Float DebugDuration
  Slot Root
Outputs
  Impulse OnHit
  Impulse OnMiss
  ICollider HitCollider
  Float HitDistance
  Float3 HitPoint
  Float3 HitNormal
  Int HitTriangleIndex

Raycast Oneノードは Raycastへインパルスを入力するとレイキャストを実行します。レイキャストのプロパティは様々な入力によって制御され、最初のコライダのヒットに関する情報はノードの出力によって提供されます。

== 使用方法

入力

Origin は、レイがキャストされるポイントを定義します。この値は、入力された Root スロットの ローカル座標空間からの相対値として扱われます。デフォルトは [0;0;0] です。


Directionは、レイがキャストされる方向ベクトルを定義します。この値は入力されたRootスロットのローカル座標空間からの相対値として扱われます。この入力は、デフォルトが[0;0;0]であるため、値を設定することが必要です。


MaxDistanceはレイキャストの最大長を制御します。レイキャストの実際の長さは、この入力と入力されたRootスロットのグローバルスケールの両方によって影響されます。デフォルト値は非常に大きい (~3.4×1038) ので、これを設定することが推奨されます。


HitTriggersは、コライダーTypeフィールドがTriggerまたはHapticTriggerとして設定されているコライダーコンポーネントのみを有効なヒットターゲットとしてみなすかを決定するものです。デフォルトはfalseです。


UsersOnlyは、アクティブなユーザーを持たないコライダーを有効なヒットターゲットとみなすかどうかを決定します。デフォルトはfalseで、この場合すべてのコライダーが有効なヒットターゲットとみなされます(他の要因に依存します)。しかし、trueに設定すると、アクティブなユーザーを持つ(つまり、ユーザーのスロット階層の下で子になっている)コライダーだけが、有効なヒットターゲットとみなされます。


DebugDuration 入力は、レイキャストデバッグビジュアルが持続する時間を決定します。この値は秒単位ですが、0 (デフォルト) に設定された場合、ビジュアルは1フレーム間持続します。負の値に設定された場合、デバッグビジュアルは描画されません。


Root は、Origin, Direction, MaxDistance が計算されるローカル座標空間の基準スロットを定義する入力項目です。

出力

OnHit 出力は、レイがキャストされたときに有効なターゲットコライダーがヒットした場合にインパルスを出力します。


OnMiss 出力は、レイがキャストされたときに有効なターゲットがヒットしなかった場合、インパルスを出力します。


HitCollider の出力は、レイキャストのパスに沿ってヒットした最初の有効なターゲットコライダーを提供します。この値は、OnHitから始まるインパルス連鎖の間のみ有効です。デフォルトは、nullです。


HitDistance の出力は、レイキャストの原点と HitPoint の間のグローバルな距離を出力します。この値は、OnHitから始まるインパルス連鎖の間のみ有効です。デフォルトは0です。


HitPoint の出力は、レイキャストが最初に HitCollider と交差する点のグローバル座標を提供します。この値は、OnHitから始まるインパルス連鎖の間のみ有効です。デフォルトは[0;0;0]です。


HitNormal の出力は、レイキャストと HitCollider の交点に対する法線ベクトルを出力します。


HitTriangleIndexは、HitColliderMeshCollider (Component) である場合、ヒットしたメッシュのポリゴンのインデックスを出力するものです。

注意事項

コライダーは、その Type enum フィールドが Trigger, HapticTrigger, HapticSampler に設定されていない限り、通常レイキャストに対する有効なヒットターゲットとなります、HitTriggers入力の詳細を参照してください。コライダーコンポーネントの IgnoreRaycasts bool が false に設定されている場合、コライダーは有効なターゲットではなくなります。

ノードメニュー

Physics
Back Apply Character Force Apply Character Impulse As Character Controller Character Controller User Character Gravity Character Ground Collider
Character Linear Velocity Find Character Controller Hit UV Coordinate Is Character Controller Is Character On Ground On Collision End On Collision Start
On Collision Stay Raycast One Raycaster Set Character Gravity Set Character Velocity