Attaching player to moving camera after respawn


I’m working on my little shmup game and encountered a small (hopefully) problem.

The player is attached to movable camera, which is flying over the map. I made respawning system according to this page:

Spawning works like a charm, but I cant find a way to attach player pawn to the camera after respawn. Tried ‘AttachToActor’ and ‘SetOwner’ nodes, but the camera actor is not visible anywhere in graph.

Also spawning location is an issue. I know that I have to set player spawn location based on current location of the camera but how - that is the question. Still cant find a way to get current location of that movable camera.

Any advice would be helpful


on the character you spawn, event begin play, grap the camera component from it, and find “Set active” node with the camera component attached to it.

if that doesn’t solve your issue, than i’ll have you show me your blueprints so I could get a better understanding

The thing is, that the camera actor is moving via matinee, and my player character is child of that camera. This way the camera can fly above the map and pawn is moving with it while idle. I don’t have camera component in player character blueprint. Well, maybe the problem is this solution…

I found out different approach but had not enough time to finish it. I’m not destroying the pawn but instead, I’m setting it invisible with blocked movement and disabled shooting. This way character is still child of camera actor. Only problem here is to move character to location relative to camera. I still can’t get parent (camera actor) location in player character blueprint