How to create a camera system like Mario Odyssey?


I have simplified it down to this, and it works exactly the same as the one i copied.