Cam Control 3D
- ThrownException
- Jan 29, 2018
- 1 min read
Java doesn't come with integrated camera controls in a 3D environment. After creating the Shape Box 3D, I realised it was kinda necessary to allow dynamic camera movement.
This is just a sample application without much 3D content, just camera mouse and keyboard control. Press ESC to release the mouse from the application. Move your mouse to rotate the camera, use WASD + SPACE+ SHIFT to move the camera.
Mouse modes:
- Oriented / Oriented_Invert: This is a normal "human" camera rotation. Left and right directions are always horizontal and up and down are always vertical.
- Free / Free_Invert: This is more like a "jet" kind of camera rotation. All directions are relative to the current camera rotation.
Keyboard modes:
- Static / Static_No_V: Any movement will be in the same direction, regardless of the camera orientation. No_V means no vertical. You could compare this to a "drone" control scheme.
- Dynamic / Dynamic_No_V: Any movement will be relative to the camera orientation.
With the Free / Free_Invert mouse modes, this is the only compatible mode. You could compare this mode to a "jet" control scheme.
- Combined / Combined_No_V: Up and down will be on the Y axis, the other directions will follow the orientation of the camera, but only on the horizontal plane. You could compare this mode to a normal "human" or "player" control scheme.

Comments