So I ended up figuring the problem with with help from @j-p. What I wanted to do was move the object, so I applied the glm function translate()
to the model matrix. To do this I went over to my controls file and created a function called
glm::mat4 getModelMatrix();
which returned the variable glm::mat4 ModelMatrix
that I had also declared in the header file. The actual portion of code and moved the object was like so:
//If the the corresponding key is pressed...
ModelMatrix = glm::translate(ModelMatrix, glm::vec3(0.0f, 1.0f, 0.0f); //move y 1.0f
//else If..etc..
Then passing back towards my main loop the final code would look like:
computeMatricesFromInputs(window,time); //function that handles input and computes viewMatrix
glm::mat4 projectionMatrix = glm::perspective(45.0f, 4.0f/3.0f, 0.1f, 100.0f);
glm::mat4 viewMatrix = getViewMatrix();
glm::mat4 modelMatrix = getModelMatrix();
glm::mat4 MVP = projectionMatrix * viewMatrix * modelMatrix;