Using a Static Camera

Choose your OS:

In this How-to we take a look at creating a static (or fixed) camera angle that is used for a player's perspective during gameplay. Once completing this tutorial, you can take the process used here and apply it to your own game to set up a fixed perspective for a player to view your game from.

For this example, we are using the Blueprint Third Person Template project with Starter Content included.

  1. From the Modes menu while in Place Mode , search for Camera then drag a Camera into the level.

    camera_bp1.png

    You can place the Camera Actor where you would like the view perspective to be for your players. To get a better idea of the view the player will have, you can take a First Person perspective from the Camera's Point of View by locking the Viewport to the Camera Actor and entering Pilot mode.

  2. With the Camera selected in the level, Right-click on it, then from the context menu select Pilot 'CameraActor'.

    camera_bp2.png

    You can now move around the Viewport using the WASD keys while holding the Left or Right Mouse Button down. While you fly around the level, the Camera's position will move along with your movement allowing get an idea of the perspective the camera will take during gameplay.

  3. To unlock the Camera, click the Unlock button.

    camera_bp3.png

    The camera will remain at the resulting position when you select to unlock it.

    The icon next to Unlock allows you to toggle between showing the in-game camera view or level editor view.

  4. With the Camera Actor selected in the level, click the Blueprints button from the Main Toolbar then select Open Level Blueprint.

    camera_bp4.png

  5. Inside the Level Blueprint, Right-click anywhere in the graph window and select Create a Reference to CameraActor.

    camera_bp5.png

    By adding a reference to the Camera Actor, the Level Blueprint now knows which camera we are talking about in the level (as we could have multiple cameras set up inside our level).

  6. Right-click in the graph again and search for and add the Event Begin Play node.

    camera_bp6.png

    This node only executes once and executes anything following it when the game is started.

  7. Right-click in the graph again and search for Set View Target and select the Set View Target with Blend node.

    camera_bp7.png

    You may need to un-check the Context Sensitive checkbox for the node to appear in the list.

  8. Right-click in the graph once more and add the Get Player Controller node.

    camera_bp8.png

    You can re-check the Context Sensitive checkbox to make it easier to find the node.

  9. Connect the nodes as shown below.

    camera_bp9.png

    Here we are saying on Event Begin Play (when the game starts), Set View Target with Blend (set the viewing angle) to CameraActor (the New View Target) for the Player Controller Index 0 (which is the default player).

    The other options on the Set View Target with Blend node allow you to Blend in over time, specify the type of Blend used, or any Exponents used in controlling the Blend; you can also lock the outgoing view target for the Blend (we will leave these all as default).

  10. Click the Compile to finish and then close the Blueprint window.

    camera_bp10.png

  11. From the Main Editor View, click the Play button to play in the Editor.

End Result

You will now see that when the game starts, the player's view is assigned to and using the Camera Actor that you have placed in your level. You may have also noticed that the view is letterboxed; you can disable this by un-checking the Constrain Aspect Ratio option inside the Details panel for the Camera Actor.

camera_bp12.png