Original Post
Hi all.
So I'm trying to load in an md2 model to use as the controllable character. I have loaded it in just fine, but I'm facing issues when trying to move the model along with the camera.
I'm using the SuperBible (5th edition) for my OpenGL, and this project is based on one of the examples.
The project isn't OO, so all the code is jammed into one main file, so you can see the code HERE.
I've tried to set both the camera and the model's origin, but then neither of them move for some reason. If I set the camera origin, and not the model's origin, the model is able to move, and visa versa.
Setting neither of their origins works but then ofc, I can't see the model as they're both at (0, 0, 0).
What am I doing wrong here?
Also, how can I change the controls so that the model moves along with the camera? The way I have it at the moment, the model rotates with 'a' and 'd' and doesn't move to the left of right. Do I need to move the camera behind the model around the model's axis? How do I do this?
There's a lot here, I understand, but I can't seem to find out how to solve this!
Many, many thanks for any help!
So I'm trying to load in an md2 model to use as the controllable character. I have loaded it in just fine, but I'm facing issues when trying to move the model along with the camera.
I'm using the SuperBible (5th edition) for my OpenGL, and this project is based on one of the examples.
The project isn't OO, so all the code is jammed into one main file, so you can see the code HERE.
I've tried to set both the camera and the model's origin, but then neither of them move for some reason. If I set the camera origin, and not the model's origin, the model is able to move, and visa versa.
Setting neither of their origins works but then ofc, I can't see the model as they're both at (0, 0, 0).
What am I doing wrong here?
Also, how can I change the controls so that the model moves along with the camera? The way I have it at the moment, the model rotates with 'a' and 'd' and doesn't move to the left of right. Do I need to move the camera behind the model around the model's axis? How do I do this?
There's a lot here, I understand, but I can't seem to find out how to solve this!
Many, many thanks for any help!