Quick answer: Lock-on bugs are target-state and switching bugs. Capture the locked target, the candidate set for switching, the lock-on parameters, and the edge-case context like target death or occlusion with every report. With that snapshot you reproduce a lock that grabbed the wrong enemy, refused to switch, or dropped unexpectedly, instead of guessing from a player's description.
Auto-aim and lock-on systems carry a lot of weight in action games, and when they misbehave the whole combat experience feels off. A player locks onto a distant enemy instead of the one in front of them, tries to switch targets and the lock will not move, or loses the lock the instant a target ducks behind a pillar. Each of these is a decision the lock-on state machine made from the targeting context at that moment, and the context is gone a frame later. You cannot reproduce which enemy was the closest valid candidate by reading a complaint. The fix is to capture the lock state, the candidate set, and the edge-case context. This post covers exactly what that means and why lock-on edge cases are so plentiful.
Lock-on is a target-selection state machine
A lock-on system maintains a current locked target and rules for acquiring, switching, and releasing it. Acquisition picks a target from valid candidates by some scoring of distance, angle, and visibility. Switching moves the lock based on player input, usually a stick flick or a camera nudge toward the desired target. Release drops the lock when the target dies, leaves range, or is occluded. Most bugs are wrong decisions in one of these three operations, and to debug them you must know which operation ran and what candidates it had. The locked target alone is not enough; you need the set it was chosen from.
The scoring that selects targets is where the most maddening bugs live, because it has to balance several factors and edge cases pile up. Should a closer enemy behind the player beat a farther one in front. Should an enemy mostly hidden behind cover remain a candidate. Should a tiny enemy and a huge boss be weighted equally. Each answer creates edge cases, and players will find every one. Capturing the candidate list with each candidate's distance, angle, visibility, and computed score turns a frustrating wrong lock into a transparent decision you can evaluate against your intent.
Capture the locked target and the candidate set
The core snapshot is the currently locked target, its identifier and position, and the full set of candidates the system considered at the moment of the bug, each with the inputs that fed its score: distance to player, angle from the camera or aim direction, visibility, and any type weighting. When a player reports locking onto the wrong enemy, this snapshot shows which candidate won and why. Often the cause is immediate, like an angle weighting that favored a centered but distant enemy over a closer one slightly off screen, which is a tuning decision you can now reconsider with real data.
Capture the lock-on parameters in effect, since like aim assist they are often configurable and vary by context. The maximum lock range, the angle limits, the visibility requirement, and any per-weapon or per-mode overrides all shape the decision. A lock-on that grabs targets too far away might be a range parameter that is too generous in a particular mode, not a logic bug at all. Recording the effective parameters lets you separate a misconfiguration from a flaw in the selection logic, which matter for fixing the issue in the right place rather than patching the wrong layer.
Switching and the edge cases that break it
Target switching is its own source of bugs and deserves dedicated capture. When a player tries to switch and it fails or jumps to an unexpected target, record the input that requested the switch, its direction or magnitude, the candidate the system chose to switch to, and the candidates it rejected. Switching usually projects the locked target and candidates onto screen space or a direction and picks the best match for the input, and bugs arise when that projection misbehaves, for example when two candidates are nearly collinear and the wrong one wins, or when a small stick input below a threshold is ignored and the lock appears frozen.
Edge cases dominate lock-on bug reports because the system must handle a constantly changing scene. A target dies while locked and the lock should transfer or release, but it lingers on a corpse or empty space. A target walks behind a wall and the lock should hold briefly or drop, depending on your design, and the timing of that is easy to get wrong. A target teleports or is despawned by another system, leaving a dangling lock. Capture the specific edge-case context, what happened to the target and when, the visibility timeline, and the lock state through the transition, because these moments are exactly where the state machine forgets to update.
Make lock-on deterministic and replayable
Lock-on selection is deterministic given the candidate set, the player input, and the parameters, so a captured snapshot can be replayed by reconstructing the candidates and feeding the recorded input through the selection code. Build a debug mode that records lock-on decisions over a few seconds, the candidates and scores, the chosen target, the switch inputs and outcomes, and the release events, and lets you step through them. A wrong lock or a failed switch becomes a single decision you can inspect, where the scores and projections reveal precisely why the system chose as it did.
Visualize lock-on in the debug build: draw lines to all candidates, label their scores, highlight the locked target, and show the switch projection when the player flicks the stick. Most lock-on bugs become obvious when you can see the candidates and their scores together, an off-screen enemy that should not have been a candidate, a switch projection that points the wrong way, a corpse still in the candidate list. Pair the visualization with the captured snapshot, then save the snapshot as a regression test that feeds the candidates and input and asserts the correct target is locked or switched to.
Setting it up with Bugnet
Bugnet's in-game report button captures device and platform context automatically, and you extend it with custom fields for the locked target, the candidate set with scores, the lock-on parameters, the switch input and result, and the edge-case context such as a target death or occlusion event. Because the button snapshots state when a player reports a wrong lock or a stubborn switch, you receive the actual selection decision from that frame, not a description of an enemy that should have been targeted. That snapshot makes a fleeting per-frame targeting decision concrete and reproducible on your own build.
Occurrence grouping reveals which lock-on issues are systemic. If the lock repeatedly fails to release from dead targets, Bugnet folds those reports into one issue with a count, exposing a release condition that misses a case rather than a scatter of isolated complaints. Filter by weapon or mode using custom fields to find parameter sets that select poorly, filter by platform for input-device differences in switching, and keep every decision snapshot in one dashboard. Targeting feel is deeply subjective, and grouping plus captured decisions convert that into a prioritized list of concrete selection, switching, and release bugs.
Tune targeting and lock it down
Lock-on is a feel feature, and feel is best tuned from the situations players actually hit rather than from your own combat sessions. The captured candidate scores and switch projections let you adjust distance and angle weighting, range and visibility requirements, and switch thresholds against real reported moments, and to confirm the changes resolve the wrong locks without breaking the right ones. Every lock-on bug you fix should leave a regression test built from the captured decision, so a future tuning pass cannot silently reintroduce the lock-on-corpse or the won't-switch behavior you already corrected.
Treat lock-on as a deterministic selection machine whose output is a function of the candidate set, the input, and the parameters, all of which you can capture and replay. Once reports carry the targeting decision, you build lock-on visualization and replay, and you grow a test suite of corrected decisions, the wrong target and it just won't switch complaints become specific, fixable bugs in selection, switching, or release. Players get targeting that follows their intent through the chaos of combat, and you can refine it confidently because every change is validated against the exact frames where the lock-on previously chose wrong.
Lock-on is a target-selection state machine. Capture the locked target, the candidate set, and edge-case context and wrong-target complaints become concrete bugs.