Camera Done

I have setup a camera system by looking for guides online. By using W,A,S,D it's possible to move the camera forward, backward, left and right. E and Q rotates the camera. The look-at direction is determined by the mouse position on the screen. This is not strictly necessary for the project, but it's always useful to have a camera. Also, something that is different from the labs is that in modern OpenGL you create a model-view-projection matrix or a model matrix, view matrix and a projection matrix. The MVP matrix is then sent to the shader code and used there to multiply vertex positions with. In the animation lab track the matrices are stack-based and probably calculated on the CPU which is deprecated. The camera code was taken from "LearnOpengl" here.

Next I am planning to do something that isn't needed for the project either, namely implementing a skybox, or a cubemap. I don't think it will be too difficult and wont take that long either. When that is done I can finally start looking into the main topic - rigid body simulation.

Video shows the camera being tested on a simple triangle

Kommentarer

Populära inlägg i den här bloggen

Collisions

Optimizing Particles With VBO

Particle Generation