Camera Roation
I only looked through the code briefly but it seems that you're not clearing the modelview matrix each time you call renderframe()? Additionally, the only thing I thought was wrong with your math is that you're not translating by the negation of your camera position; i.e., do glTranslatef(-x, 0, -z);
Lol, in the time I read the code and made the post, jakem3s90 pretty much said what I was gonna :P
Wouldn't clearing the modleview just be loading the ident matrix since the modelview matrix is already selected? And I just added in the - to the translation, just figured out why u want that hehe.
I gtg right now but I'll b working on this l8er today, thx for ur help everyone!
I gtg right now but I'll b working on this l8er today, thx for ur help everyone!
Yea that's what I meant, glLoadIdentity() with it. You don't want transformations from last frame affecting this frame's matrix and compounding together into a mess.
Hey man, I couldn't get your class to compile, so I pulled out your two function of RenderFrame and SetupFrame, fixed them, and got it working correctly. I'll try and email you the source, otherwise I'll catch you online later!
--Jake--
--Jake--
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement