// camera vars to fill out mat4 view, proj updateViewProj() // compute proj matrix and view matrix (when needed), you could write a separate updateViewMat and updateProjMat, if you like updateProjMat() // sets up proj and aasumes canonical camera is at the origin and looking down the -z axis updateViewMat() // sets up view and is affected by moveLeft, moveRight, moveForward, and moveBackward Lets focus on updateViewMat, and on moveForward for the "ground view" One option is to have the below used for all move* functions float camRot; // camera rotation about the y-axis vec3 camPos; // camera position moveForward() smallStep = rotateAroundY(camRot) * vec3(0,0,-1*stepSize) camPos = camPos + smallStep; moveBackward() ... moveLeft() ... moveRight() ... updateViewMat() // use camPos and camRot, and a small "look down rotation" to create view // you must implement any needed rotate/translate matrices (e.g., use 4x4 matrices to incorporate both rotations and translations) // recall that if you have 4x4 matrixes, then you will multiply them by 1x4 vectors, and divide by w // xform order matters: https://www.youtube.com/watch?v=CmgSye6-Ack