Skip to content

Feature: Unified Movement Speed and Zoom-Based Velocity Scaling#50

Open
winyunq wants to merge 1 commit intoHeyZoos:mainfrom
SecondSinoJapaneseWar:camera-zoom-refinement
Open

Feature: Unified Movement Speed and Zoom-Based Velocity Scaling#50
winyunq wants to merge 1 commit intoHeyZoos:mainfrom
SecondSinoJapaneseWar:camera-zoom-refinement

Conversation

@winyunq
Copy link

@winyunq winyunq commented Feb 25, 2026

Feature: Unified Movement Speed and Zoom-Based Velocity Scaling

This PR optimizes the camera's kinetic feel by unifying movement calculations and introducing dynamic speed scaling based on zoom altitude.

1. Unification of Movement Variables

  • Change: Replaced independent \EdgeScrollSpeed\ and \MoveSpeed\ constants with a unified \NowMoveSpeed\ model.
  • Why: Previously, WASD input and Edge Scrolling used separate speed values, leading to inconsistent behavior. By consolidating them, all camera displacement (Keyboard, Edge Scroll, Drag) now shares a unified, predictable velocity model.

2. Zoom-Linked Velocity Scaling

  • Change: Implemented linear interpolation (Lerp) for \NowMoveSpeed\ based on current zoom height.
  • Why: Fixed-speed cameras feel sluggish at high altitudes and hyper-sensitive at low altitudes. This change ensures a consistent \screen traversal time\ for the player regardless of zoom level, improving overall control precision.

3. Refactored Movement Application

  • Change: Updated \ApplyMoveCameraCommands\ and \EdgeScroll\ logic to utilize the shared \NowMoveSpeed.
  • Why: Eliminates redundant hardcoded speed injections and ensures that any future changes to the movement curve automatically apply to all input methods.

@winyunq winyunq changed the title Dynamic Camera Movement Speed based on Height Feature: Unified Movement Speed and Zoom-Based Velocity Scaling Feb 26, 2026
@winyunq winyunq force-pushed the camera-zoom-refinement branch from 0127273 to 71acb37 Compare February 26, 2026 00:15
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.

1 participant