Skip to content

Positional Near-Wall Offset#186

Merged
themrdemonized merged 5 commits intothemrdemonized:landerfrom
Lander-Modding:positional-nearwall
Apr 27, 2025
Merged

Positional Near-Wall Offset#186
themrdemonized merged 5 commits intothemrdemonized:landerfrom
Lander-Modding:positional-nearwall

Conversation

@ProfLander
Copy link
Contributor

Generalizes HUD near-wall behaviour into a scalar, and uses it to drive the existing HUD FOV offset, as well as a new position offset that shifts HUD items along their local Z axis. Also adds the option to disable it entirely.

With a device or weapon in hipfire position, this uses the existing min / max nearwall range values to determine positional offset.

As Z-shifting is liable to cause scope or stock clipping during ADS, a new nearwall_zoomed_range LTX parameter has been added to configure maximum offset on a per-weapon basis. By default, this is set to a conservative value calibrated around vanilla sniper optics, but could be extended to the full vanilla weapon set with sufficient effort, as well as to any reposition mod.

Per-item offset behaviour (i.e. less awkward motion for knife, detector, other upwardly-oriented items) will be coming alongside per-item tracing in the big g_firepos rewrite branch, which I'll start on polishing into a PR now this is ready for eyes-on.
It has a hard dependency on this, #183, and #179 / #184, but I'll probably send it over as a free-standing branch for transparency if I finish up before the rest are signed and sealed.

@ProfLander ProfLander changed the base branch from all-in-one-vs2022-wpo to lander April 25, 2025 15:38
- Necessary to prevent scopes etc. clipping into the camera on a per-weapon basis
- Default is conservative, calibrated around sniper optics
- Offsetting along HUD item forward for now; per-class specialization to
  come alongside the g_firepos feature branch
- Applied in a new OnFrame implementation (called from CHUDManager)
- Necessary to run late, as offsetting causes a feedback loop if
  witnessed by the ray query, and graphical issues if done in render
@ProfLander ProfLander force-pushed the positional-nearwall branch from 46032d6 to 450773b Compare April 25, 2025 15:41
@themrdemonized themrdemonized merged commit 503ca0e into themrdemonized:lander Apr 27, 2025
@ProfLander ProfLander deleted the positional-nearwall branch May 24, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants