Skip to content

EntityVisible

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

EntityVisible

EntityVisible:Int32 src_entity:Int32, dest_entity:Int32
Parameter Mode Type Default Description
src_entity In Int32 required The entity that looks.
dest_entity In Int32 required The entity it looks at.

Returns: True if nothing in the way blocks the line, otherwise False.

Description

Tells whether two entities have a clear line of sight between their origins. Every entity with a pick mode that is an obscurer, see EntityPickMode, blocks the view; the two entities themselves and hidden entities never do.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()

guard = CreatePivot()
PositionEntity guard, 0, 0, -6
thief = CreatePivot()
PositionEntity thief, 0, 0, 6

crate = CreateCube()
EntityPickMode crate, 2

If EntityVisible(guard, thief)
	Text 8, 8, "The guard sees the thief"
Else
	Text 8, 8, "The crate is in the way"
EndIf
Flip
WaitKey

Related Commands

EntityPick, EntityPickMode, LinePick, PickedEntity

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally