Home

lookingAt

LookingAt is a term used in software development and game design to describe a relation between a viewer or agent and a target, indicating whether the target lies within the viewer’s forward direction or line of sight. In practice, it often refers to a check or function named lookingAt, isLookingAt, or similar that returns a boolean or, less commonly, a vector result, depending on the API.

Typical approach in 3D environments uses orientation vectors. Given a source position and a forward direction,

Common contexts include: video games for NPC gaze or target detection; camera or avatar systems to determine

Variations exist across libraries and engines; the exact name and return type vary, and some systems use

and
a
target
position,
the
check
computes
the
vector
to
the
target
and
the
angle
between
vectors.
If
the
angle
is
below
a
specified
threshold,
and
optionally
if
the
distance
is
within
a
maximum
range,
the
system
considers
the
target
to
be
looking
at
the
source.
In
code,
this
is
commonly
implemented
using
a
dot
product
or
a
raycast.
if
an
interlocutor
is
in
view;
robotics
and
computer
vision
for
gaze
estimation;
AR/VR
interfaces.
In
2D
scenarios,
angles
are
measured
in
the
plane;
in
3D,
the
calculation
uses
the
full
space.
raycasting
to
robustly
handle
occlusion,
while
others
use
simple
angle
checks.
Because
it
is
a
name-label
rather
than
a
universal
API,
the
concept
appears
under
many
aliases,
and
its
details
depend
on
the
platform.