Home > Articles

  • Print
  • + Share This
This chapter is from the book

Setting Up a Fixed Camera

Right now, your game has a camera that follows your Pawn around. This is the default, but for the game you want to make, it isn’t quite right. Instead, you want a camera to stay fixed, looking down at the spaceship from above. You also don’t want it to move when the Pawn does.

To solve this quandary, you can use Camera Actors and view targets and the built-in PlayerController class to set the view that a player sees. This setup could be done in the Level Blueprint, but it would then be more difficult to port your game logic to a new level. Instead, you are going to bundle this camera logic into a Game Mode. When the game begins, the Game Mode will spawn a camera for your game and then tell the PlayerController class to use that new camera.

In the next Try It Yourself, you use the BeginPlay event and the SPawn Actor from Class node to create a new camera and position it with a Make Transform node before setting it as the PlayerController class’s view target.

  • + Share This
  • 🔖 Save To Your Account