Maxx WeverTechnical Designer

ZIMA.

Case studyDynamic camera

Goal

Create a dynamic camera that always prioritizes player input, yet automatically positions itself to face where the player would already want to look.

Prototype

Before the team had a build, I prototyped the camera around the boat asset in a personal project. Every camera behavior lived in its own small modifier, which set the direction for all later 3Cs work.

  • Free look on mouse or left stick, and scroll to zoom.
  • Field of view widens with speed.
  • Camera tilts slightly into turns.
  • Lock-on that turns the camera towards a nearby point, stronger the closer you get.
First prototype, weeks 0–1.

Iteration 1: Look-ahead camera

Problem

The prototype camera required me to manually shift sides to test if certain camera angles looked right, but it didn’t naturally guide me as a player.

Solution

This iteration guides the camera’s facing direction based on player speed and direction. It’s primitive, but does a good job of predicting the default camera view.

Look-ahead camera following speed and direction.

Iteration 2: Dynamic pitch

Problem

When the player moves their camera to a bird’s-eye view, they can barely see anything because the camera is too close. From a worm’s-eye view, they can barely see anything either, because the camera tries to avoid the floor and shoves itself into the boat.

Solution

This iteration replaces the default camera pitch with a dynamic one. Looking from a bird’s-eye view, the camera stretches out and pulls much further back so the player can see more of their surroundings. Looking from a worm’s-eye view, the camera stays in place instead of moving into the floor and getting pulled in.

The field of view changes too. The sky is really, really big, so the camera imitates peripheral vision by widening the field of view when looking from a worm’s-eye view.

Camera pulling back from above and widening from below.

Iteration 3: Obstacle avoidance

Problem

When an obstacle stands between the player and the camera, it cuts through the camera’s boom arm and pulls the camera in, which gets the camera stuck inside the obstacle.

Solution

A simple but naive approach is to cast a ray from the player to the camera, detect when the player is occluded and push the camera closer immediately. But that is a camera cut, which violates the 30° rule: in cinema, every cut should change the angle by at least 30°, or it creates a jarring sense of motion.

A much more elegant solution is to turn the camera out of the way before the obstacle gets there. An array of raycasts, called “whiskers”, detects obstacles early. If any whisker hits one, the camera swings away in time.

Camera swinging around an obstacle.

Result

The final camera leaves the player in control, steers towards where they should go when they let go, and stays out of walls and the floor. Each feature is a separate modifier, so it was easy to tune and extend right up to release.

What I learned

  • Look-ahead: a camera should show where the player is going, not just where they are. Speed and direction alone are enough to predict a good default view.
  • Dynamic pitch: one fixed boom length can’t serve every angle. Pulling back from above and widening the field of view from below keeps the player’s surroundings readable.
  • Obstacle avoidance: avoid camera cuts that break the 30° rule. Detecting obstacles early with whiskers lets the camera swing away smoothly instead of snapping in.
  • Giving each modifier its own degree of freedom (roll, pitch, yaw, X, Y, Z and field of view), applied once at the end of each tick, stopped modifiers overriding each other.
  • The biggest resource when building this camera system was John Nesky’s GDC talk “50 Game Camera Mistakes”.