O'Reilly logo

UnrealScript Game Programming Cookbook by Dave Voyles

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

Creating a top-down camera

The top-down camera is popular with RTS games or shooters, as it offers a perspective that allows players to easily see approaching enemies. With our top-down camera we'll have our pitch locked, so that the player cannot look up or down, and therefore also locks the camera from being raised or lowered.

We will still allow the player to freely yaw left and right, and therefore rotate around the world, although the camera will follow the pawn from a fixed perspective.

We'll be hardcoding our values again. Much of what you'll see next is similar to the code found in the side-scrolling camera code. We'll be using another custom player controller as well, which is only marginally different from that of the side-scroller's. ...

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