Laser
The keeper's pointer, and everything the player does with their hands.
Laser
The keeper's pointer, and everything the player does with their hands.
The scene entrypoint mounts this on mount_laser. It keeps the rdr control
scheme live for the whole run, casts the beam from the local camera's eye,
writes Core.dot every frame for the cats to chase and the plates to weigh,
runs the heat model, and raises whistle and interact on the bus.
The beam
A ray leaves the eye along the camera's forward vector and runs C.LASER_RANGE
metres. Anything whose entity name carries the word mirror reflects it, up to
C.LASER_MAX_BOUNCES times; the first surface that is not a mirror is where the
dot lands. The line is drawn from the muzzle of the model in the hand rather
than from the middle of the eye, so it reads as coming out of the pointer.
The trace skips its own geometry by NAME (rdr_beam_*, rdr_ptr_*,
rdr_pointer_*) rather than by a list of entity ids: a hot reload spawns the
replacements a frame before the originals are collected, and for that frame an
id list names entities that are no longer the ones on screen.
Heat
Held, the pointer warms over C.LASER_HEAT_SECONDS and cuts out for
C.LASER_COOL_SECONDS, then comes back cold. Released, it runs back down over
coolSeconds. Core.state.heat and Core.state.cutOut are the HUD's reading.
The first cut-out carries first = true on laser.overheat, which is Hoshi's
cue.
What it raises
laser.on / laser.off { owner } · laser.overheat { first } ·
laser.bounce { point, entity } · whistle { owner, position } ·
interact { owner, entity }: the entity under the crosshair within
interactReach metres, which the tower slice works the mirror with.
Driving it from code
setTrigger(on) holds and releases the trigger the way the input layer does,
and report() answers what the pointer is doing this instant: the trigger, the
beam, the heat and the dot. A test harness and a scripted beat both use them.
Fields
| Field | What it means |
|---|---|
map | the rdr scheme this component keeps live |
walkMap | the builtin scheme the body walks on, held as a second claim so the on-screen INTERACT button reaches the mirror |
humVolume | the diode carrier held while the beam is on |
sfxVolume | the trigger, cut-out, mirror chime and whistle |
coolSeconds | seconds of release a fully hot pointer takes to run cold |
interactReach | metres ahead of the eye an interact press looks |
Scoped to this part · feeds back into the world's score.