Collision & spatial queries · 1 / 10

Ray Casting

線と形状の交差から照準や接地を調べる。

Compare in motion

照準のレーザー

Synchronized comparison
AReference
障害物を通過する照準

障害物を通過する照準

BRay Casting100%
狙った対象や接地点を検出できる

狙った対象や接地点を検出できる

Loading demo…

Scrub to pause and inspect. At 0%, B matches A; at 100%, B shows the effect. The scene repeats every 8 seconds.

Look for: 最初の交点を探す → 対象で止まる。

This model simplifies the technique to show its use case and effect. Operation counts describe the model; they are not performance measurements.

Read the storyboard

例: 照準のレーザー

  1. 1. Start

    光線が出る

  2. 2. Change

    最初の交点を探す

  3. 3. Result

    対象で止まる

狙った対象や接地点を検出できる。時間変化を示す模式図です。実際の描画結果や処理速度を再現したものではありません。

How it works

  1. 1. Input

    始点と方向の光線

  2. 2. Process

    形との最初の交差を探す

  3. 3. Result

    命中位置

A schematic of Ray Casting. It shows the relationship between input, process, and result; exact values and rendering depend on the implementation.

Further reading

Box2D Collision ↗

A general reference for this subcategory.