Lag when bringing the gun to the mag (magwell/collider checking) #50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)
HandInteractor._update_snap/ mag rail logic) running expensive shape/collider queries every physics frame while the mag is near the magwell.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