Home

llSensor

llSensor is a function in Linden Scripting Language (LSL) used in the Second Life platform to configure and perform proximity sensing from within a script. It enables an object to detect nearby avatars or other objects within a defined radius and, optionally, to filter results by type, name, or specific identifier. A sensor can be configured to emit repeated updates at a defined rate or to report a single update.

The function works by specifying filters for what to sense and how often to report results. Typical

When enabled, llSensor causes the environment to generate sensor events for each detected entity that matches

Usage considerations include the impact on script performance and sim resources. Larger ranges and higher update

filters
include
the
type
of
entities
to
detect
(for
example
avatars,
objects,
or
both),
an
optional
name
filter,
an
optional
unique
identifier
filter,
the
sensing
range
in
meters,
and
the
update
rate
in
seconds.
By
adjusting
these
parameters,
a
script
can
focus
on
particular
targets
and
control
the
frequency
of
reports
to
balance
responsiveness
with
performance.
the
configured
filters.
Each
event
provides
details
such
as
the
entity’s
type,
its
unique
ID,
its
displayed
name,
and
its
distance
from
the
sensing
object.
The
sensor
can
be
disabled
or
reconfigured
by
calling
llSensor
again
with
new
parameters.
rates
increase
processing
load
and
memory
use,
potentially
affecting
script
performance
and
teleporting
behavior.
llSensor
is
commonly
employed
in
proximity-based
interactions,
access
control,
and
scripted
AI-like
behaviors
in
virtual
environments.
See
also
related
sensor
functions
such
as
llSensorRepeat
and
other
proximity
APIs
in
LSL.