レイキャスト
dx12_raycastRaycast from origin along direction to detect first hit body. Returns hit, distance, point, normal, entityId, name. Used for hit detection, wall detection, line-of-sight during gameplay.
Instructions
origin から direction 方向へ物理レイを飛ばし、最初にヒットしたボディを調べる。★Playing 中のみ意味のある結果(Editor 中は body 未登録なので hit=false)。{hit, distance?, point?, normal?, entityId?, name?}。normal は現状 常に up 方向の近似値(エンジンの既知の制約)。当たり判定確認・地面/壁の検出・ラインオブサイトの確認に。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | [x,y,z] レイの始点。 | |
| direction | Yes | [x,y,z] レイの方向(正規化不要。エンジン側で正規化される)。 | |
| maxDistance | No | 最大距離(既定 1000)。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | エンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。 |