Sunday, 31 July 2011

Camera axes: To invert or not to invert?

If you're the kind of person who likes to browse a game's menu and settings before playing (or if you're the kind of person having trouble with camera rotation in games), you probably know that many first person and third person games allow you to invert the x and/or the y axis of the joystick/mouse for camera movement. But why do we have that option, and why should game developers care about that? Let's see...

Let's consider real life situations in which we have a camera that can rotate (more or less) freely.

The first case is when the cameraman is holding the camera himself. Typically, a shoulder cam:

In that kind of situation, in order to rotate the camera in one direction, the cameraman has to move his hands in the same direction. If I want to look up, I must do an upward motion. Simple. This is called the "normal" way. Let's take another example and picture a camera mounted on a tripod:
Now things are different. The "control point" is the handle. As it is behind the camera's pivot point, everything is inverted. If I want to pan the camera to the left, I have to push the handle to the right. If I want to look up, I need to push the handle down.

So there we are, with two paradigms. When someone plays a game in which he has control over the camera, his mind will be set to one of these paradigms, whichever feels more comfortable to the player in that situation.

This "problem" tends to be even more present in third person games, as the pivot point is the character, and the camera is behind the character. In this situation, there are two ways of thinking:
  • "I'm controlling the camera's position, which always targets the same point", in which case we'd need to move the camera to the right to see what's happening to the left.
  • "I'm controlling the camera target's position", in which case we move the target in the direction we want to look at.
Note that these mindsets are totally irrelevant to the way the camera is actually implemented.

Also, the same kind of issue may arise whenever the player interacts with something mounted, such as a turret ("What matters the most? The object I'm moving? Or what's it's pointing at?").

As a result, and because people are all different, there's no right way of handling it. The best thing to do then, is to let the player have it his/her way and choose if the axes must be inverted or not. As far as implementation is concerned, it's no more work than a multiplication, and a couple additional entries in the settings menu.

I remember when I played the first Gears of War for the first time, it took me a good 5 minutes to figure out which settings suited me best, as this was the first time in a long while I was playing a third person shooter. So how do games handle this?

If the designers actually cared (or thought) about that, the tutorial will include a sequence in which the player will be asked to move the camera around to look at stuff. Then, he/she will be told that if it doesn't feel right, the settings can be changed. An example below is Vanquish.

Some games will even go as far as integrating that adjustment in the gameplay/story, like in Halo 2.

Another interesting example is Dead Space 2, in which the animated menu reflects those camera settings:

However, while interesting, I don't think this one is a very good execution since:

  1. It's kind of hidden.
  2. The changes aren't reflected immediately.
  3. The feedback is a bit unrelated to what can be experienced in the game, so it's not a good validation method.
At the end of the day, if your camera is bit unconventional, keep in mind that you might have to give the player the opportunity to assess if inverted axes feel more appropriate, and obviously let them invert them.