Log inGet started
Package

laserScan.styleBlock

README.md

Sweep: laser scan line (styleBlock, Colour)

A lidar laser scan: a bright line rises and falls through the world, leaving a trail of points that fade and take their colour from distance.

It is one of the five sweep blocks; all run the sweep shader with their own defaults, so any one swaps for another in the Colour slot with one change. Pings come from Sensors.ping(origin) (sensorGoggles sends one from the wearer every few seconds while a ping sensor is on) and every player in the world sees the same ping; contacts and their roles come from styleRoles roles, the scene's players and entity names.

local Sensors = require("~sensorBlocks.Sensors")
Sensors.use("sonarPing")
Sensors.ping(player.position, { speed = 25, range = 50 })

What it gives up in motion

What a ping or beam revealed is fixed to the world, so it stays on surfaces as you move. The radar beam turns about once every three seconds and a ping ring travels at tens of metres a second; both light a band of the world, never the whole screen at once. Grain changes per pixel per frame.

How it treats content

  • Opaque things: dark until the beam, ping or scan line reaches them, then lit with their outline and fading.
  • Transparent things (glass, water): not in the depth, so a ping passes through them and lights what is behind.
  • Particles and smoke: not detected, like a real sonar or lidar.
  • Sky: nothing returns, so it stays the background colour.
  • Fog: ignored; the display shows returns, not light.
  • Skinned characters: revealed like any surface, with their role marked; the motion tracker shows them only while they move.
  • Foliage: revealed as a soft mass of outlines.
  • World text: unreadable on the display; screen UI is drawn after the stack and is never touched.
  • Black does not stay black: the display makes its own light.

Known limits

  • The beam, ring and scan line light every surface they pass through; they do not stop at walls the way a real signal would.
  • At most 8 pings and the 32 nearest contacts are drawn.
  • The sensorBlocks package README's Known limits lists the rest.