Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

wrong behavior for manually oriented cameras #209

Open Aeva opened 8 years ago

Aeva commented 8 years ago

Cameras should be able to be manually positioned instead of using the look_at property, but if you do, it'll stare off into the wrong direction. This is probably because M.GRL assumes a different up vector (0, 0, 1) than GL does. If memory serves, GL assumes (0, 1, 0) is up.

This might be as simple as an extra matrix to put everything into the correct coordinate space, though it might be more exotic than that, and that maybe instead the view_matrix in this case would be the inverse of the camera's world_matrix? (wild stab in the dark).