Sensor
Detect nearby entities, cast rays, and configure collision handling.
Feature: Events
What do you want to do?
llSensor(string name, key id, integer type, float radius, float arc)Performs a single scan from the prim's forward vector for name and id of type within radius meters and arc radians. Results trigger a sensor or no_sensor event. Passing empty filters (blank name, 0 type, or NULL_KEY id) disables that filter.llSensorRepeat(string name, key id, integer type, float radius, float arc, float rate)Sets up a repeating periodic scan every rate seconds for name and id of type within radius meters and arc radians of the forward vector. Results trigger sensor or no_sensor events.list llCastRay(vector start_pos, vector end_pos, list options)Casts a ray into the physics world from start to end and reports collision data for intersections with objects based on options. Returns a list of strided values [UUID_1, {link_number_1}, hit_position_1, {hit_normal_1}, ..., status_code]. A negative status_code indicates an error; otherwise, it represents the number of hits.Reference
12 topic entries
list llCastRay(vector start_pos, vector end_pos, list options)functionCasts a ray into the physics world from start to end and reports collision data for intersections with objects based on options. Returns a list of strided values [UUID_1, {link_number_1}, hit_position_1, {hit_normal_1}, ..., status_code]. A negative status_code indicates an error; otherwise, it represents the number of hits.
llCollisionFilter(string name, key id, integer accept)functionSets the collision filter, either exclusively or inclusively. If accept is
TRUE, only collisions matching name and id are processed; ifFALSE, matches are excluded. Pass an empty string orNULL_KEYto name or id to skip filtering on that parameter.llPassCollisions(integer pass)functionSets the pass-collisions attribute. If pass is
TRUE, collision events are passed from child prims to the root; ifFALSE(default), they only trigger events in the affected child prim.llSensor(string name, key id, integer type, float radius, float arc)functionPerforms a single scan from the prim's forward vector for name and id of type within radius meters and arc radians. Results trigger a sensor or
no_sensorevent. Passing empty filters (blank name, 0 type, orNULL_KEYid) disables that filter.llSensorRemove()functionRemoves the periodic sensor previously configured by
llSensorRepeat.llSensorRepeat(string name, key id, integer type, float radius, float arc, float rate)functionSets up a repeating periodic scan every rate seconds for name and id of type within radius meters and arc radians of the forward vector. Results trigger sensor or
no_sensorevents.llVolumeDetect(integer detect)functionIf detect is
TRUE, enables VolumeDetect (object becomes phantom and physical objects/avatars can pass through it). Triggerscollision_starton initial intersection andcollision_endwhen intersection stops (standard collision events are suppressed while intersecting).collision_start(integer num_detected)eventTriggered when an avatar or another object first begins colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.
collision(integer num_detected)eventTriggered continuously while an avatar or another object is colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.
collision_end(integer num_detected)eventTriggered when an avatar or another object stops colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.
sensor(integer num_detected)eventTriggered when objects matching constraints of
llSensororllSensorRepeatare successfully detected. Passes num_detected, representing the number of detected targets.no_sensor()eventTriggered when active sensors (from
llSensororllSensorRepeat) complete a scan without finding any matching targets.
No matching entries. Try a different term or filter.