b3dEntityPick

Ray-casts from entity forward direction (returns picked entity handle, 0=no hit). Takes entity (source entity handle), range (maximum ray distance). Returns picked entity handle (Int), or 0 if no hit.

3D Graphics

Parameters & Returns

Parameters

entity Int
range Double

Returns

Int

Quick Summary

Ray-casts from entity forward direction (returns picked entity handle, 0=no hit). Takes entity (source entity handle), range (maximum ray distance). Returns picked entity handle (Int), or 0 if no hit.

Technical Exegesis...

Ray-casts from entity forward direction (returns picked entity handle, 0=no hit). Takes entity (source entity handle), range (maximum ray distance). Returns picked entity handle (Int), or 0 if no hit. Validates entity exists, resets g_lastPickResult, gets entity position and forward direction (local +Z transformed to world space), tests ray against all mesh entities within range respecting pickMode, returns closest hit entity handle. Forward ray-cast for line-of-sight and shooting.

Example

Example.bam
; No example implemented yet