▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage pursuitKit.package·originates fromworld 0a0b119f-a…
engineAdapters
The director's adapters written against the Zero engine.
by·posted 11d ago
What it does
engineAdapters
The director's adapters written against the Zero engine.
The rest of pursuitKit is engine-free and is what the test suite covers. This module is the only place that
calls the engine, and it is small on purpose. NOT YET RUN IN THE ENGINE (2026-11-19): the calls are the ones
documented in the physics guide (`Physics.raycast(origin, direction, maxDistance)` returning
`{ entityId, distance }` or nil, answering from colliders only).
local Adapters = require("~.modules.engineAdapters")
local hasLine = Adapters.lineOfSight({ eye = 1.6, chest = 1.1, pass = function(entityId) return false end })
-- hasLine(observer, suspect): observer and suspect are the tables given to director:setObserver / setSuspect,
-- with optional `y` (ground height, default 0) and `entityId` (their own collider, never counted as a wall).
-- `pass(entityId)` lets the host name colliders a line may cross (glass, a crowd, the suspect's own vehicle).
local light = Adapters.lightByHour(function() return hour end, { dawn = 6, dusk = 20, blend = 1 }, lamps?)
-- light(x, z): 1 by day, 0 at night, blended over `blend` hours; `lamps(x, z)` may return a 0..1 floor
-- (a street lamp's pool) so lit pavements stay visible at night.
The interface is documented in the header of init.luau; this file repeats it for the asset browser.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.