I'm currently working on an FPS, and at the moment I'm trying to write everything to do with walking.
My question to you is, how do you go about making the camera tilt slightly whilst strafing left and right as seen in some games?
I've tried a few things and have had a few problems. I've had problems specifying when the camera should stop rolling, I came up with a sort of solution to that, but I now have the problem where if I strafe, say to the right while turning the camera to the left (yaw) then stop the camera will be permenently tilted.
This is my code so far. It's bad, I know but I'm a beginner
Code messed up here - see second post
That seems to do the job. The camera rolls slightly and smoothly whilst strafing. The only problem is that if I strafe and turn yaw at the same time the camera ends up stuck tilted
Edited by littletray26, 15 October 2012 - 11:50 PM.