Sensor
Detect nearby entities, cast rays, and configure collision handling.
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
Kind
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.functionllCollisionFilter(string name, key id, integer accept)Sets the collision filter, either exclusively or inclusively. If accept isTRUE, 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.functionllPassCollisions(integer pass)Sets the pass-collisions attribute. If pass isTRUE, collision events are passed from child prims to the root; ifFALSE(default), they only trigger events in the affected child prim.functionllSensor(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 orno_sensorevent. Passing empty filters (blank name, 0 type, orNULL_KEYid) disables that filter.functionllSensorRemove()Removes the periodic sensor previously configured byllSensorRepeat.functionllSensorRepeat(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 orno_sensorevents.functionllVolumeDetect(integer detect)If detect isTRUE, 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).functioncollision_start(integer num_detected)Triggered when an avatar or another object first begins colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.eventcollision(integer num_detected)Triggered continuously while an avatar or another object is colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.eventcollision_end(integer num_detected)Triggered when an avatar or another object stops colliding with the object containing the script. Passes num_detected, representing the number of detected collisions.eventsensor(integer num_detected)Triggered when objects matching constraints ofllSensororllSensorRepeatare successfully detected. Passes num_detected, representing the number of detected targets.eventno_sensor()Triggered when active sensors (fromllSensororllSensorRepeat) complete a scan without finding any matching targets.event
No matching entries. Try a different term or filter.