Camera view (V)
World view (M = V⁻¹)
V = (T(eye) Ry(yaw) Rx(pitch))⁻¹

Drag in the camera view to look around. Move with WASD, up/down with QE, faster with Shift (click the view first). Pitch is limited to ±89° so the camera can't flip over.

View matrix V

Camera matrix M = V⁻¹

The rows of the 3×3 part of V are the camera's right, up and backward axes (the camera looks down −z); in M they are the columns, and the last column of M is the eye position.

Made with Claude
This demo needs WebGL 2, which isn't available in this browser.