UnrealScript Game Programming Cookbook

(Chris Devlin) #1

3


Scripting a Camera


System


In this chapter, we will be covering the following recipes:


f Configuring the engine and editor for a custom camera
f Writing the TutorialCamera class
f Camera properties and archetypes
f Creating a first person camera
f Creating a third person camera
f Creating a side-scrolling camera
f Creating a top-down camera

Introduction


Cameras in UDK are an essential part of gameplay. They can simultaneously be one of the
most frustrating yet rewarding things to program, as once they are working correctly they
can completely change a player's experience, because you control their window to the world.


So with that, let's talk about cameras.


Understanding the camera


The camera system for UDK is comprised of three key classes: Camera, Pawn, and
PlayerController. All of these classes interact to control the rotation, position, and
special effects that should be applied to the player's camera during the course of a game.

Free download pdf