Code RoomCamera teleport on frame stall
MediumPrep Room Coding #4293

Camera teleport on frame stall

Vibe & agenticAlgorithms & data structuresMid–Senior~15 min

A Copilot-generated C++ camera-follow routine smooths toward the player each frame. QA reports that after a hitch — a one-second asset-streaming stall — the camera teleports across the level and clips through geometry. Review the smoothing code and explain the delta-time misuse that causes the teleport.

Implement
smooth_follow_position(start: float, target: float, smooth_speed: float, frame_dts: list[float], max_dt: float) → float
Examples
in[0,100,8,[0.016,0.016,0.016],0.05]out31.8868572820453
in[0,100,8,[1],0.05]out32.967995396436066
in[0,100,8,[1],0]out99.96645373720975
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 15 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.