Archived

This topic is now archived and is closed to further replies.

Marik

cant seem to get gluLookAt to work correctly..

Recommended Posts

this code works fine invoke glLoadIdentity _glTranslatef 0.0f, 0.0f, -0.2f _glRotatef yr, 0.0f, 1.0f, 0.0f call drawTorch it draws a torch around 0,0,-0.2, and rotates it, wonderfull, now i need to move the camera... so i try invoke glLoadIdentity _gluLookAt 0, 0, -0.2f, 0, 0, 0, 0, 1, 0 _glTranslatef 0.0f, 0.0f, -0.2f _glRotatef yr, 0.0f, 1.0f, 0.0f call drawTorch but nothing shows up on the screen, am i getting the order right? am i missing anything? thanks much!

Share this post


Link to post
Share on other sites
If I remember correct is the first point for the eye and the second point the "look at" value. Try to switch them.

Share this post


Link to post
Share on other sites
got it to work, sorta, i just said fuck it, and made my own 3d rotation routines, which rotate a point around 0,0,0 at specified angle, so i can rotate objects around the viewport, and move the viewport in any direction... thanks though, good fuck that was hard...

Share this post


Link to post
Share on other sites