Log inGet started
Package

HelmCamera.component

Newest version

README.md

HelmCamera

The Aurelian's chase camera. A cameraBehavior, installed onto the local player's camera rig by ShipHelm at awake, replacing the built-in chase.

It exists because @builtin::controller.chase flattens its trail into the XZ plane and never rolls — right for a car, wrong for a ship that pitches through its own vertical and lays over into its turns — and because of the two measured problems below.

What it does

  • Trails along the ship's own axes. A barrel roll rolls the frame; a climb keeps the bow where the player put it.
  • Speed pushes it back and opens the lens. 60 degrees parked, ~73 at the cruise cap, ~81 wide open. The extra field is what makes speed read as speed when there is nothing but stars to read it against.
  • Boost adds a fast extra kick of both, and eases back in when you stop — the visual half of "boost is expensive".
  • Retro burn shoves the camera forward past the ship, the way a hard brake throws you against the belts.
  • A hull hit shakes it, driven off Drift.state.shake.
  • Scroll trims the resting distance, and speed and boost are offsets on top of that trim.

Two things it gets right that are easy to get wrong

The position is smoothed as an offset from the ship, never as a world position. Smoothing a world position makes the lag proportional to speed: at the boost cap a 0.3 s blend leaves the camera 65 units behind where it wanted to be, and the ship flies out of its own frame exactly when the player most needs to see it. The shipped controllers all do it the other way — measured, chase at distance = 6 settles 76 units behind a target moving at 200 u/s (engine issue #8403).

It runs at executionOrder = 10, after the helm's -50. A lower order runs earlier, so the built-in controllers' -90 puts them a whole frame behind what they follow — which on a loaded frame is fifteen units of trail nobody asked for.

Measured after both: through a full-boost climbing turn the ship stays within 10 degrees of the camera axis against a half-field of 32 to 39 degrees.

Fields

distance minDistance maxDistance height zoomSpeed · speedDistance boostDistance brakePush · baseFov speedFov boostFov · lookAhead · positionLag aimLag (seconds, not blend factors) · shakeAmplitude

The distances are sized against a hull that measures about 6 x 4 x 8 units. A trail sized for a bigger ship is the quiet way a chase camera loses its subject.