Hello. I’m trying to create a camera that functions like in most top-down games, Divinity 2, League of Legends, BG3. etc.
I currently have two “modes/cameras” locked and unlocked, where the player can switch between them by pressing left shift to change which camera is being used, with the locked camera being attached to the spring arm and functioning as normal, following the player as he moves.
Then the second camera can be moved via edge scrolling, by checking the mouse position and moving the camera respectively if close to the borders after being detached from the spring arm on switch. Then snaps back to the spring arm when deactivated, creating a smooth transition between a locked and unlocked camera.
All of that is working well, but the issue comes up when i try to add zoom functionality. I’m very lost as to how i can make both cameras zoom in and out the same amount without the need for a spring arm as the unlocked camera is not affected by it when in use but is when not.
I hope i explained it well enough. I appreciate any kind of help.