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 third person camera

UDK now comes with a third person camera built into the kit, but we'd still prefer to use our own modular camera system. Epic's popular Gears of War franchise uses this camera style, and then zooms into an over-the-shoulder view when sprinting. We'll cover more of that in our next recipe.

Getting ready

As with our previous recipe, we'll require one similar change in the TutorialPlayerCotroller class. Under defaultproperties, we'll need to change it so that it reads as the following:

CameraClass = Class'ThirdPersonCam'

Our code looks nearly identical to that of our first person camera, minus a few simple changes that I'll highlight. Most notably, we're looking to hide our first person mesh, so that only our third person ...

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