O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using first-person camera

Now is the time for action! Our core objective is to create two weapons in our game: bullets and a grenade. Although we are in 5000 AD, we are still medieval and simulate the same weapons we use today. However, first we need to move around in the scene, so we need to simulate the first-person camera. This is a simple simulation of how we see a scene if we were physically present there. For example, you are sitting in a room and have a camera on a remote-controlled vehicle on the moon, and you see the surface of the moon from that camera.

We start our animation implementation with the explanation of the first-person camera as we want our bullet and grenade animations to start from the player's position. Now, to simulate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required