How to cast to character in level Blueprint?

Is the character placed in the level already?

If your character is already placed in the level, then select him and right-click in the Level BP, then choose Create a Reference to your guy. You’ll get a blue node like below with the name of him which you can cast or do whatever. However, if your character gets spawned thru a game mode or player start position or whatever, then you can use the Get Player Character or Get Player Pawn or even go down thru your Player Controller to find it’s controlled Paw as shown. However, note that the character may not have spawned yet when the Begin Play on the level blueprint is fired … so it’s best to do any casting after a short delay to give him time to be spawned in.

1 Like

Got a question connected to this. I followed a tutorial for pickup items, in which the dev referenced the player character BP in the level BP. In his case, the player character was already in the scene when the tutorial started - however by default, the player character in UE5 is only spawned when clicking play, and I couldn’t find a way to reference it in the level BP.

Therefore, I dragged the BP_TopDownCharacter into my scene in order to replicate the reference in the level BP. But now, when I click play, I control a duplicate (BP_TopDownCharacter0), which is not able to interact with the items.

Is there a way to either

  • tell UE to control the player character in the scene, so BP_TopDownCharacter, instead of BP_TopDownCharacter0
    or, even better
  • reference BP_TopDownCharacter in the level BP, even though it’s not in the scene (aka the default when a new level is created)? :slight_smile:

You can do something like this but keep in mind to correctly index your player start pont.

Good luck