How can I get a reference to default camera in a new "blank" project with no starter content?


When I create a new blank project with no starter content, project comes with 5 actors;

  • atmospheric fog
  • sky sphere
  • light source
  • player start
  • default floor

When I start playing level, I can see that a number of actors are added automatically, such as camera, default pawn, game mode etc. Since these actors are only available during gameplay, there is no way to create a visual reference node for these actors by dragging & dropping them to blueprint editor.

Question: How can I get a reference to default camera in blueprints? - (currently working on a very minimalist FPS, so I need to trace a line from camera)

Note: I’ve already tried getting a reference to camera by getting all actors in scene and searching by name. However, name of actors added on fly keep on changing incrementally! So, searching by name seems to be unpredictable.

Kind Regards,

Hey Dynamo,

default GameMode starts with a Default Pawn Class that has its own CameraActor. You can reference it with Get Player Camera Manager node, which gives you access to its location and rotation, among other things. It might be worth your while to look into creating your own GameMode and assigning a custom Default Pawn Class and Player Controller Class to it, so you have more control during development.

There some documentation available about GameMode and what it’s for here:

and some info on setting up a Controller and Pawn here:

Not all of that information would apply to you if you’re attempting to make something simple, but a simple GameMode + Default Pawn Class + Player Controller might save you a lot of work in your project.

Hope that helps!

Dear ,

Thank you very much for quick and detailed reply.

Both links are great!
Now, I understand how it works under hood…