Answer the question
In order to leave comments, you need to log in
How to make the camera follow the player?
Hello.
There is a certain cube (now it is my character). The camera hangs above him from above and slightly to the side. Previously, when the character was rotated, the camera would also rotate after it. I hung a script on the camera, which in Start() catches the current Rotation of the camera in Quaternion and in Update assigns transform.rotation the value of our quaternion. Now the camera does not follow the player, but orbits around him when the player turns ¯\_(ツ)_/¯
Goal: the camera should fly over the character at a certain height with an X 45 tilt (bird's eye view), rising and going down with our player. As I understand it, you need to freeze the Rotation of the camera in Y and Z, but I don’t know how to do it. Everything I've tried causes the camera to move in orbit around the player.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question