PDA

View Full Version : gluLookAt and a tile-based top down view



Mick Derevnin
06-11-2011, 02:12 AM
Hi everyone,

Just a hopefully simple question about gluLookAt. Since the UP vector cannot be parallel to the view direction vector, to achieve a top down tile-based camera, would we have to create our own model view matrix to handle this?

Would anyone be able to point me in the right direction to achieve this?

Regards.

Alfonse Reinheart
06-11-2011, 02:19 AM
Just change your up direction to be parallel with the plane of the tiles. If your tiles are in the XY plane, just have your up axis be +Y. Your view direction will be along the Z axis.

Mick Derevnin
06-11-2011, 03:09 AM
Thanks Alfonse, very simple indeed!