by kaetemi · 6y ago · 0 comments
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...