Posts

Showing posts from February, 2018

Setting up a first person camera in OpenGL to move around in your 3D world

Image
A first person camera is a very useful tool which helps you navigate around in a 3D world. It is mainly used in 3D games ( eg. First person shooters ) and CAD based applications. This post is a walkthrough in which you'll set up a first person camera, and by the end of this post, you'll be able to move and look around in your 3D world. Here is a video clip for demonstration: Prerequisites This is a tutorial for the OpenGL API ( I'll use the GLUT library to simplify the coding tasks ) with C++ as the programming language. Although, the mathematical concepts will be (almost) same for any other environment or programming language. If you're working with OpenGL, you are in luck. Here's a list of things that you should already be familiar with: Setting up a perspective projection Drawing basic geometric shapes Translation and Rotation Roughly speaking, you should know basic OpenGL. Some experience with Input and Interaction in OpenGL ( ...