I am making an RTS game with free camera movement with zooming; I have the logic working for the movement but I would like to have the camera move faster when zoomed out, and slower when zoomed in. If possible, how can I add this to my existing blueprint?
You can set your pawn’s MaxWalkSpeed every time your zoom changes.
You can implement a similar set up to your zoom speed multiplier or Zoom Distance Curve for controlling the scaling, I’d recommend using the Spring Arm’s target arm length as the variable to scale your pawn’s speed.
Hey @LumaraIG!
In this case I’d recommend having an actor class (camera actor) for your camera instead of having it as a pawn or a component inside the player character, and handling it this way inside the player character’s Event Graph:
(The reason is that you won’t be able to predict where the camera’s gonna end up by adding movement input.)
And here’s the result:
Hope this helps!
Link movement speed to the spring arm length. Scale it up when zooming out, down when zooming in
Thanks to everyone who commented, I came up with my own solution using bits and pieces of your recommendations!
Glad you got it working, while that isn’t exactly expensive to run on the tick function. It is entirely redundant, since the speed only changes when the zoom changes. Therefore you should set the new speed at the same time as the zoom.
Using the tick function is fine for prototyping and is needed for certain cases but once you have it working you should always ask yourself “Does this need to be called ~60 times a second?” more often then not, the answer is no and think about when and why this needs to be executed.