--- id: camera-follow name: Camera.follow category: camera kind: namespace-method tokens: Camera.follow sig: Camera.follow(x, y, lerp) tip: Ease the camera toward centring a target point. order: 2 ns: Camera member: follow --- Moves the camera a fraction lerp of the way toward centring the world point (x, y) on screen. lerp is a fixed in 0.0..1.0: 0 holds still, a small value trails smoothly behind a moving target, 1.0 snaps it centred. Call it each frame with the target's position for a classic smooth-follow camera. Deterministic. Parameters: - `x`, `y` — the world point to centre on (usually the player) - `lerp` — how far to move this frame (a `fixed`, 0..1) ```ludic program Demo { property Position { x: int = 0, y: int = 0 } model Player { Position } handler DrawWorld phase Render { Camera.follow(Position.x, Position.y, fixed(1) / fixed(8)) # smooth trail Screen.show() } } ```