First off, all of my code can be found here, it’s in 3 files.
flythrough.cpp, support.cpp, support.h
Okay… so if you run that, it seems to work, but a few things are really bugging me!
The camera is starting off in a strange location, I try to change all kinds of variables, but it doesn’t seem to have an effect.
The biggest issue right now is moving the camera. At this point in time… the camera WILL move left and right, but NOT forward or backward. When I try to move forward, it’s like the pixels are doing the correct thing, the object will eventually vanish as I move forward, like I’ve moved past it, but the object itself is not “appearing larger” as I get closer. Same for moving backward.
Please let me know if you can come up with anything.
I’d like to add that a majority of this code comes from my textbook. With modifications from myself.
Thanks!
Its an orthographic camera, therefore you cannot move along the Z axis. You need to change your camera type to do what your trying to do.
Ref: Line 33, flythrough.cpp
Typically, just uncomment this line, then write the following:
This will multiply a perspective matrix by the currently loaded identity matrix (LoadIdentity()).
Ref: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml