I'm trying to rotate my
OrthographicCamera in the render loop to a fixed angle, but I can only make the camera spin. This is the code that I have:
OrthographicCamera camera = new OrthographicCamera(); camera.setToOrtho(true, 100, 100); camera.position.set(50, 50, 0); camera.update();
in the render loop:
The camera keeps spinning each frame. But I'd like the camera to stay at 30 degrees.
I have already seen this answer:
But I don't like it because this code is too drastic. I wonder if there is a more "common" way to do this.