I've been trying to get back into 3D for a few days now, and I decided to make the camera. The problem is that when I rotate around the z axis, the rotation is actually applied to my movement in such a way that the y position of the camera rises a little if the z rotation is not 0. I'll show you my code:

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org