Original Post
I'm working on a simple camera for my game which should basically behave as so: It will remain centered on the player, a billboarded sprite, at all times (unless a script takes control of it). The player can move around in the map and the camera will follow at a fixed distance, presumably from a bird's eye view (think SNES RPG, only in a 3D environment). The player will be able to rotate the camera along the X and Y axis, and possibly zoom in and out. Right now, I just have a simple map. My camera moves around the map just fine, so having it follow the player won't be an issue. However, whenever I attempt to rotate the camera, the map is rotated around its origin, as opposed to where the camera "looks" at (which would be the player's position). Basically, I do this... glTranslatef(mEng.xPos, mEng.yPos, mEng.zPos); glRotatef(mEng.xRot, 1.0f, 0.0f, 0.0f); glRotatef(mEng.yRot, 0.0f, 1.0f, 0.0f); ...and then I render the map. I feel like I'm missing something here, perhaps an additional translation which would recenter the map, but experimentation hasn't given any positive results. I've checked around, but my limited knowledge of 3D mathematics has let me down somewhat. Any help...? :)