Camera Roation

Started by
25 comments, last by Wavesonics 19 years, 8 months ago
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);
Advertisement
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!
==============================
A Developers Blog | Dark Rock Studios - My Site
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.
did that, doesnt work...
==============================
A Developers Blog | Dark Rock Studios - My Site
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--
damn awesome man! I'm online, send it to if hotmail is giving u trouble. I'm also on ICQ and MSN now. So either way.

[Edited by - Wavesonics on December 7, 2008 6:20:45 PM]
==============================
A Developers Blog | Dark Rock Studios - My Site

This topic is closed to new replies.

Advertisement