I want to make the camera move with the player if the player is moving to the edge of the screen, moving with him to always keep the player on the screen.
In the setup that I have, I have implemented a target lock system that sets the position of the root of the spring arm between the targeted AI and the player, so as we an see both the player and the AI. The issue is when you move the camera and the player character, you can have the camera look at the targeted AI while the player character is off screen.
I want it so that the camera always keeps the player on the screen, even if you move the camera and the player separately. A good example of this mechanic can be seen in Legend of Zelda: Breath of the Wild. The camera would either zoom out or move with Link as he approaches the edge of the screen (while in target lock mode) but the camera can still be moved by the player.
I hope that I’ve explained what I meant well, if not then I can edit the post and maybe provide diagrams to illustrate my issue.