You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I’ve been working on a game for a long time, however, I’ve remade it several times. The system I’m still trying to create today is a custom camera system similar to the one in the video I’ll attach. I have the current code for my camera script, but it is somewhat “abstract” and I find it difficult to fix it, because it was created a long time ago, together with help from a friend of mine.
What is the issue?
The problem is necessarily in the code and possibly in the logic of the code, but in the current code, when I use Lock On on an enemy and then move with my character, the camera moves in a strange way. In addition to sometimes, almost rarely, the code “breaks”, strangely.
What solutions have you tried so far?
Redo the code several times to look as close to the result I want to achieve. I need someone who has experience with camera manipulation, as to this day I am very “average” in this area.
Try offsetting the camera backwards relative to itself, it looks as if it zooms in too close when the player walks around. You could also try lerping the camera when the move direction of the humand changes, to really ease into the frankly almost jarring camera movement. Id focus on zooming out when the player moves and easing camera transitions when the player moves. Youd also need to make sure the character isnt looking opposite to the camera by checking both their dot products because the camera looks fine from that angle.