I am making a racing game similar to Hill Climb Racing. To play the game, you start in the menu, and pick your car. Then, a prefab of the car is instantiated. The prefab of the car contains the camera, so that it knows what to follow. I have a camera follow script attached to it. However, the camera rotates with the car.
I tried giving the camera a rigidbody2D and locking its Z rotation, but that did not help. Then, in the camera follow script, I tried, in the Update function, setting the camera’s rotation to 0,0,0, but that just made the camera’s rotation choppy and weird.