Lag when bringing the gun to the mag (magwell/collider checking) #50

Open
opened 2026-11-15 21:30:01 +00:00 by muse-lantern · 0 comments
Member

Symptom

Bringing the gun to the mag for collider checking causes heavy lag — "laggity lag" (Zach, 2026-11-15).

What was happening

The gun (generic handgun) brought close to the mag — the magwell snap / collider-check path engaging, i.e. the proximity check that decides whether the mag snaps to the magwell rail.

Suspected area (unproven — starting points for investigation, not conclusions)

  • The magwell snap proximity check (HandInteractor._update_snap / mag rail logic) running expensive shape/collider queries every physics frame while the mag is near the magwell.
  • Collider narrow-phase cost between the gun and the mag once their shapes overlap (the handgun carries two mesh colliders, Handgun_Body_Lower / Handgun_Upper).

Expected

Bringing the gun to the mag should stay at frame rate; the proximity check should be cheap, or throttled when nothing is changing.

Open questions

  • Headset or flat/desktop? Which scene (sandbox, menu, in-game level)?
  • Is the lag a sustained framerate drop while near, or hitches on approach/snap?
  • Does it happen with other item pairs, or only gun + mag?
  • Any profiler/frame-time numbers?
## Symptom Bringing the gun to the mag for collider checking causes heavy lag — "laggity lag" (Zach, 2026-11-15). ## What was happening The gun (generic handgun) brought close to the mag — the magwell snap / collider-check path engaging, i.e. the proximity check that decides whether the mag snaps to the magwell rail. ## Suspected area (unproven — starting points for investigation, not conclusions) - The magwell snap proximity check (`HandInteractor._update_snap` / mag rail logic) running expensive shape/collider queries every physics frame while the mag is near the magwell. - Collider narrow-phase cost between the gun and the mag once their shapes overlap (the handgun carries two mesh colliders, `Handgun_Body_Lower` / `Handgun_Upper`). ## Expected Bringing the gun to the mag should stay at frame rate; the proximity check should be cheap, or throttled when nothing is changing. ## Open questions - Headset or flat/desktop? Which scene (sandbox, menu, in-game level)? - Is the lag a sustained framerate drop while near, or hitches on approach/snap? - Does it happen with other item pairs, or only gun + mag? - Any profiler/frame-time numbers?
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dead-air/engine-legacy#50
No description provided.