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

Comprehending the orbit camera

A camera that rotates around the target and looks at it at all times is called an orbit camera. An orbit camera can also be understood as a camera that moves along the surface of a sphere. Hence, the location of a camera is defined by three parameters: Azimuth, Elevation, and Radius, as shown in the following figure:

Comprehending the orbit camera

However, in our code, we will not use the terms Azimuth and Elevation, but will stick to using yaw and pitch. We do so as Azimuth and Elevation are absolute angles but yaw and pitch use incremental angles.

The third parameter is the radius. We use the term "distance" instead. In orbit cameras, we generally ...

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