Horizontal (x and z axis) movement according to camera rotation?

I’m trying to create a third person game and I’d need to make the player walk forward when pressing W. The forward direction can vary, so I’d need to know how to get this forward direction from the camera. Also I don’t want the mouse to control the camera (like FPS), how do I disable this?

Look in the javadocs for camera for the word “direction”.



Use the little google search box in the upper right to search for “remove flycam”. You may instead want to use the chase cam.