EDIT: i just deleted everything, this question was way to complicated.
Heres the problem: I have absolutely no idea how to code a camera script for my “game”.
In my game, there is a cube. Using the WASD keys the cube rolls away/left/back/right. It is a flying cube. I would like the camera to follow the cube. However, the camera shouldn’t roll left/right as the cube tilts, nor look down/up. The camera stays level, and watches the cube roll around. When i started, the cube’s y axis rotation was locked, and everything was fine. Now, the cube can rotate on the y axis also. The hard part of this problem is positioning the camera behind the cube. The camera should constantly position itself so that when the cube rolls away, the cube actually rolls away. I dont want the controls to get mixed up. The closest ive come to success was when i created an empty gameobject that placed itself in the center of the cube and mimicked the cubes rotation on Y. Then the camera followed that. However, after one or more forward flips, the camera would look at the cube from a side angle.
I have no clue how to even begin attacking this problem. Thank you for any advice.