I’ve made the code cleaner and more modular by creating a new class for the camera. Instead of the renderer calculating the space to screen equations the camera now does it. This also makes more sense because in the future I could hypothetically switch cameras because the renderer doesn’t care what camera it uses just as long as one exists. I also implemented rotation of the camera along the x and y axes using the arrow keys. Next I want to work on handling clipping because whenever the camera is close to the object the fps drops to 0 and weird stuff happens but as soon as I move away it returns to normal. Also I need to write more comments to make the code more readable
Log in to leave a comment