Motion Sensor: Difference between revisions

From OpenComputers: Rebooted
Jump to navigation Jump to search
m Try different heading types
m Add 'overview' heading
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Overview =
[[File:motion_sensor.png|128px]]
[[File:motion_sensor.png|128px]]



Latest revision as of 00:11, 28 August 2026

Overview

Allows detecting movement of nearby living entities, as long as a direct line of sight is given. Sensitivity can be configured via its API.

The Motion Sensor is crafted using the following recipe:

Component API

When an entity within line of sight of the Motion Sensor moves faster than the threshold a motion event is queued. The sensor has a radius limit of 8 and is updated every half second.

Component name: motion_sensor. Callbacks:

getSensitivity

getSensitivity(): number

Gets the current sensitivity of the sensor, i.e. at which speed threshold of distance / second it triggers.

setSentivity

setSensitivity(value: number): number

Sets the sensor's sensitivity to the specified value, returns the old value.