Hey, I noticed that moving the camera becomes sluggish when the game frame rate is low. I looked more into this and found that one of the causes of this issue is executing the edge scrolling movement updates inside the TickComponent function. The frequency that this function gets executed is dependent on the game's frame rate (it seems like that's how most Tick functions work in unreal). So, because it's dependent on frame rate, that means the RTS camera will move faster/slower as the game frame rate increases/decreases during the life of the game.
Here is how to repro the issue:
- run game using the Play In Editor
- open console using ` key, then execute these commands:
Stat FPS
- this will display the FPS
t.MaxFPS 20
- this locks the FPS to 20
- Now try moving the camera with edge scrolling, then try WASD movement. you should notice that the camera movement is a lot slower at 20 FPS vs. the camera movement at say 60 FPS.
Instead of using the TickComponent function, you can use a fast repeating Gameplay timer: https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Timers/
However, unlike the edge scrolling, the WASD camera movement doesn't use the TickComponent function, so perhaps the key presses are coupled with FPS? that might be more difficult to solve vs. the edge scrolling.
Anyways, I don't think this is a big issue, especially if the player configures their graphics settings correctly to have consistent FPS throughout the game, then the player can also adjust the RTS camera speed settings. But it could be an issue for players that have inconsistent FPS, since then the camera movement speed would fluctuate as the FPS fluctuates.