Spielerando

A flashlight or lantern that follows the view rigidly feels stuck to the screen

A held light that moves exactly with the camera looks fake, and one that lags can fly off or shiver on a slow computer. Here is a springy follow that gives the light a little weight, stays steady at any speed, and never leaves the screen.

Why this works

Real things have weight, so a held light should trail a little when you turn and then settle, like a heavy object on a spring. The light must be kept near the screen and the motion run in small steps, or a slow computer makes it fly off.

When not to use it

Do not use it where the light is a tool that must hit exactly what the player looks at, such as shining at small clues in a puzzle. The lag makes the beam miss. Fix the light to the view there, or keep the lag tiny.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 20 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A flashlight or lantern that follows the view rigidly feels stuck to the screen" (read_entry camera-held-lamp-lags-behind-the-view) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP