drive
How the Nautile moves, aims and articulates — pure functions of film time. Nothing here touches an entity, so every number in the vehicle's performance can be checked without a scene.
deadlight.sub.drive
How the Nautile moves, aims and articulates — pure functions of film time. Nothing here touches an entity, so every number in the vehicle's performance can be checked without a scene.
local Drive = require("deadlight.sub.drive")
Drive.forward(41.0) -- unit heading
Drive.rotation(41.0) -- { x, y, z, w }
Drive.thrust(41.0) -- 0..1, drives props and wash
Drive.lampGain(41.0) -- { port, stbd, spot }, 0..1
Drive.lampRange(41.0) -- ({ port, stbd, spot } metres, beamThrow)
Drive.lampCone(41.0) -- { { outerDeg, innerDeg }, ... }
Drive.lampTargets(41.0) -- world points the lamps are aimed at, or nils
Drive.reach(80.0) -- how far the manipulator is out, 0..1
Drive.armPose(80.0, v) -- { yaw, shoulder, elbow, wrist } radians
Drive.beacon(20.4) -- the one strobe
The one rule
Position comes from Film.subPoseAt(t) and is never adjusted. The camera is
framed against those keys, so the vehicle rides them exactly and expresses
itself entirely in rotation.
Heading
Film.SUB_PATH is a polyline with three deliberate CUTS in it — keys a
hundredth of a second apart. A cut is a change of shot, not a movement, so the
heading is read off the segment the vehicle is actually flying and never
across the jump, and the turn into the next segment is eased over the last
1.6 s of the current one.
Movement I is a ballasted descent, not flight. Reading the heading off the path there would stand the vehicle on its nose for twenty-four seconds, so it hangs level and turns slowly on its own axis, easing into the path heading across the last second before the cut at 24 s.
The manipulator
A two-bone solve toward the cup — the wreck slice's PorcelainCup if it is in
the world, otherwise the contracted debris-field point the shot is framed on —
blended against a stowed pose by reach(t). reach IS the performance: out
over the first 40% of shot 13, a hesitation with a tremor that gives a little
and does not commit, and back over the last 30%.
Note on ramps
smooth(edge0, edge1, x) here guards its denominator by magnitude, not by
math.max. Several of these ramps DESCEND, and a math.max(1e-6, …) guard
silently turns a falling ramp into a step at edge0 that never comes back
down.
Scoped to this part · feeds back into the world's score.