Skip to content

Add scaling for background map pan and lerp - #2125

Open
Rainyan wants to merge 4 commits into
NeotokyoRebuild:masterfrom
Rainyan:feat/bg-pan-scale-lerp
Open

Add scaling for background map pan and lerp#2125
Rainyan wants to merge 4 commits into
NeotokyoRebuild:masterfrom
Rainyan:feat/bg-pan-scale-lerp

Conversation

@Rainyan

@Rainyan Rainyan commented Sep 10, 2026

Copy link
Copy Markdown
Member

Description

Convert cl_neo_background_pan from boolean option into a float scale.

Also add an accompanying cl_neo_background_lerp cvar for controlling the lerp to be used for cl_neo_background_pan, to enable gentler panning movement.

When using the cvar defaults, there are no changes introduced to the panning behaviour:

  • The cl_neo_background_pan 1 default value remains at the same CAMERA_MOVEMENT_MULTIPIER panning strength (used as multiplier of CAMERA_MOVEMENT_MULTIPIER * cl_neo_background_pan) for client config compatibility.
  • The cl_neo_background_lerp also defaults to 1 (which "lerps" at A + (B-A)*cl_neo_background_lerp, i.e. it is an uninterpolated plain assignment A=B as was the case previously).

Toolchain

  • Windows MSVC VS2022

Linked Issues

Convert the cl_neo_background_pan from boolean on/off option into a
float scale for adjusting the pan strength.

The CAMERA_MOVEMENT_MULTIPIER remains unchanged, so the default "enabled"
value of 1 keeps the same strength as before, for user config
compatibility.

The max value is capped to prevent users from turning too much, and
revealing unmapped areas of the 3D background maps.
Add new cvar `cl_neo_background_lerp` to accompany `cl_neo_background_pan`.

The lerp defaults to 1 (i.e. no lerp), but can be lowered to get a
softer pan instead of being strictly locked to the cursor position.

Lerp value of 0 uses frame interval (to disable the feature entirely,
use `cl_neo_background_pan 0`, instead).
@Rainyan
Rainyan requested a review from a team September 10, 2026 20:05
@Rainyan Rainyan added the UI/HUD Relates to the HUD, NeoUI, menus, etc label Sep 10, 2026
@Agiel

Agiel commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Is it possible to allow negative values so I can finally make the background pan in the correct direction? 👀

inverts pan direction
@Rainyan

Rainyan commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Is it possible to allow negative values so I can finally make the background pan in the correct direction? 👀

Added support for negative values in 860d531 to flip the pan direction. Unless we want X/Y axes control separated, but maybe this is good enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/HUD Relates to the HUD, NeoUI, menus, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants