Non rotating model, OpenGL/LWJGL, please!

In the following code:

if (window.isKeyPressed(GLFW_KEY_Q)) {
	Y += .3;
	// x,y,z
	camera.setPosition(0, 0, -5);	
	camera.setRotation(0, Y, 0);

I want a model to sit closer to me in the Z direction that does not itself rotate when (0,0,-5) does rotate. How should I do this?

Thank you, I have worked on this for a while!


Your question is not clear.

fine, leave

out of the equation.
and use


That’s probably not what you ment as it is obvious.

If you insist of using the function for rotation of the camera, you will get a problem with the position of the camera if it is still to look at the model. You can mend this by rotating the model around itself instead of the camera. You could look into a library-function like glm::lookAt(), but calculating the position of the camera on rotation around the model is within higschool geometric posibillities.

… but this is only guessing your problem on my part.