How come y is z.cross(x) and not up?
Edit: I think it has been answered by others - up is in world-space, and the camera is not necessarily aligned horizontally.
Edit: I think it has been answered by others - up is in world-space, and the camera is not necessarily aligned horizontally.
y = up.reject(direction).normalized()
where a.reject(b) = a - b.project(a)
[1] https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml...