The Sensor is a machine block which uses a customisable area to detect objects appearing in front of it. When the sensor detects an object, it emulates a key press.
It has one unbreakable connection point, with a similar shape to the vacuum block.
Settings[]
Parameter | Default Value | Range | Conditions |
---|---|---|---|
Detect | [B] | Keys | Use Key to Detect is true |
Use Key to Detect | False | Boolean | Wood only |
Hold to Detect | True | Boolean | Use Key to Detect is true |
Inverted | False | Boolean | - |
Ignore Static | False | Boolean | - |
Distance | 5.00x | 0.5x - 50x | - |
Radius | 0.5x | 0.25x - 2x | - |
Emulate | [C] | Keys | - |
Behaviour[]
The sensor presses and holds a key as long as it detects objects within a capsule-shaped area in front of it (or as long as it doesn't, if it's inverted).
The length and radius of the detection area are adjustable.
It can also be set to ignore static objects (i.e. terrain and pinned blocks).
An indicator light on the top of the block turns on when the block is emulating a keypress.
It can be toggled on/off with a key, if the option is set.
Scaling does not affect the scale of the detection area.
NoBounds can be used to set the detection area absurdly small, large or even negative. Negative radius sensors can be used to detect exclusively pinned or static objects. Be careful of performance drops, though.
Automation blocks run at 50hz (once per two physics steps, or every 0.02s).
Truth Table[]
The following table outlines how the sensor reacts to things when the given parameters are set.
Parameters | Nothing | Static Only | Physics Only | Static + Physics | |
---|---|---|---|---|---|
• Radius > 0 | 🟥 | 🟢 | 🟢 | 🟢 | |
• Radius > 0 • Inverted |
🟢 | 🟥 | 🟥 | 🟥 | |
• Radius > 0 • Ignore Static |
🟥 | 🟥 | 🟢 | 🟢 | |
• Radius > 0 • Inverted • Ignore Static |
🟢 | 🟢 | 🟥 | 🟥 | |
• Radius < 0 | 🟥 | 🟢 | 🟥 | 🟢 | |
• Radius < 0 • Inverted |
🟢 | 🟥 | 🟢 | 🟥 | |
• Radius < 0 • Ignore Static |
🟥 | 🟥 | 🟥 | 🟥 | |
• Radius < 0 • Inverted • Ignore Static |
🟢 | 🟢 | 🟢 | 🟢 |
Table provided by @kummajainen_ on Discord.
Note that if a sensor is already detecting a static object, the sensor will flicker once when detecting the floor.
Usage[]
Obviously, this block will trigger a keypress when it detects something. This can be used to fire a weapon, for example, or automatically steer away from obstacles.
Technology[]
The sensor has many, many uses. The big ones include:
- Guided Missiles
- Hover Vehicles
- Logic Stabilisation
- Object trackers
- Automatic landing gear
As with any good block, the possibilities are endless.
Starting Block • Wooden ( Small Block / Block / Pole / Log) • Brace • Smooth Surface Block | |
Joints ( Swivel / Ball / Hinge / Axle)
• Steering ( Hinge / Block)
• | |
Decoupler • Contractible Spring • Suspension • Slider • Piston • Spinning Block • Grabber • Winch | |
Metal Spike • Metal Blade • Circular Saw • Drill • Metal Jaw • Cannon • Shrapnel Cannon • Water Cannon • Crossbow • Vacuum • Flamethrower • Torch • Bomb • Remote Grenade • Explosive Rocket • Flaming Ball • Boulder | |
Timer • Logic Gate • Sensor • Altimeter • Anglometer • Speedometer • Length Detector • Pin Block • Camera Block | |
Flying Block • Propellers • Wing • Wing Panel • Ballast • Balloon | |
Armor Plates • Wooden Panel • Build Surface • Grip Pad • Plow • Half Pipe • Holder • Spike Ball |