Skip to content

EntityPick

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
Blitz3D

EntityPick

EntityPick:Int32 entity:Int32, range:Float32
Parameter Mode Type Default Description
entity In Int32 required The entity that looks.
range In Float32 required Distance to look, in world units.

Returns: The entity found, or 0.

Description

Looks straight ahead along the entity's own Z axis, as far as the range, and returns the first pickable entity. The entity itself is never found. Use it for shots fired from a gun entity or for "what am I facing" checks. The range is multiplied by the entity's Z scale, so a scaled entity looks proportionally further.

Related Commands

CameraPick, EntityPickMode, EntityVisible, LinePick, PickedEntity

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally