Camera control, suggested reading

Started by
1 comment, last by TerraSkilll 3 years, 10 months ago

What's good to read on third-person camera control in a 3D world? How to handle things like “character has their back to a wall”, or “character walks through a doorway but camera position is above the doorway”. What's current thinking on how to do that well? How to avoid camera behind the wall situations. How to avoid abrupt jerks.

(There are some old topics on this board from 10-20 years ago where others asked similar questions, but they're all questions, no answers, or just about how to talk to OpenGL.)

Advertisement

Are you looking for help on a conceptual level (ideas on how to address these problems) or implementations (how to do it in a specific game engine, or in you own game engine)?

For the conceptual part, I recommend you to take a look at the talk below, from John Nesky, the camera designer in Journey. Their game might have some design ideas that don't match yours (Journey has no combat and the environments are large and open), but I think it's a good start overall.

There are other talks about cameras in games on the GDC channel, you might want to take a look.

For specific problems, like the ones you cited, you can try different approaches. For example, cameras behind walls and other objects can be solved by making walls transparent (raycast from the camera to the player, and if there's an object between them, make this object semitransparent or totally transparent), or you can move and rotate the camera around until the player character is visible again. And you can combine approaches as necessary.

To avoid abrupt camera movements, when moving the camera, you generally smooths the movement, so the camera is never moving at the same speed all the time. It generally starts slower than the player character, accelerates to match his speed, and slows down a bit after the player stopped. Many modern game engines have examples and even code available to do this. This smoothing should also be applied to the camera rotation, especialy when the player has control over that (commonly in the righ analog in joysticks). And make this configurable, so you can easily tweak it when necessary.

Other thing that you should consider is on the level and environment design. Unless intentionally, avoid designing areas that the camera can never properly focus the player character.

This topic is closed to new replies.

Advertisement