banking, and side stepping
I'm curious on how people added side stepping (or strafing) in to their programs. I figured out how to move around relative to the heading, and figured the side stepping would be easy to figure out based on the heading, but i'm having trouble.
I thought the side stepping (page up/page down keys) would have the zpos and xpos switched because of the strafing path being the perpendicular of the current heading. Well it works, but only for multiples of pi/2 headings. So what's wrong with the way i'm figuring out the side stepping?
//.... later in the code
Then for banking, i want the camera, or viewport to tilt to the side (kind of like the screen is looking around a corner), but can't come up with a good approach to doing this. I thought I could tilt the entire "world" so to speak, but thought I'd have to rotate every object within the "world", and that seemed time consuming. Any ideas?
Im using codeblocks with OpenGL.