Skip to content

Conversation

@winyunq
Copy link

@winyunq winyunq commented Sep 22, 2025

Subject: Feature Request/Pull Request: Dynamic Camera Movement Speed based on Height

Hi, HeyZoos

First and foremost, I want to express my appreciation for your excellent RTS Camera plugin! It's a
fantastic piece of work, and I'm planning to integrate it into my own RTS game project.

During my development and testing, I identified an opportunity to enhance the camera's usability,
particularly in the context of RTS gameplay. I believe the current camera movement speed could benefit
from being dynamically linked to the camera's current height.

Motivation for this feature:
In RTS games, players often switch between macro-management (overview of the battlefield) and
micro-management (detailed unit control).
Higher camera altitudes* are typically used for macro-management, where faster movement across the map
is desirable for quick strategic adjustments.
Lower camera altitudes* are for micro-management, where slower, more precise movement allows for
accurate unit positioning and control.
This dynamic adjustment would significantly improve the player experience by intuitively matching movement
speed to the current strategic context.

Implemented Changes:
I've implemented a system that adjusts the camera's movement speed based on its height. Specifically, the
changes include:

  1. Unified Movement Parameter: Both edge scrolling and key-based movement now utilize a single,
    height-interpolated movement speed parameter.
  2. Base Speed Introduction: A foundational movement speed has been introduced.
  3. Height-Based Interpolation: The current camera speed is now interpolated based on the camera's height,
    ensuring a smooth transition between fast (high altitude) and slow (low altitude) movement.

These modifications are primarily contained within RTSCamera.cpp and RTSCamera.h.

I'm relatively new to the Git pull request process, but I've prepared these changes and hope you'll find
them a valuable addition to the plugin. I've focused on modifying RTSCamera.cpp and RTSCamera.h to achieve
this functionality.

Thank you again for your contribution to the community!

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